summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-02-25 19:46:08 +0000
committerMichael Williamson <mike@zwobble.org>2016-02-25 19:46:08 +0000
commitd5c13e214fd86acd3a16a2d310fe6c7774212ef9 (patch)
tree884a5d447681bde50e3cfebbda71f832b22d94e2 /README.md
parent8d41aebcbf5f06c3a9c15a9b017a01b8a5f779cf (diff)
Document bold and italic document matchers
Diffstat (limited to 'README.md')
-rw-r--r--README.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/README.md b/README.md
index f35b57b..73eca75 100644
--- a/README.md
+++ b/README.md
@@ -123,6 +123,28 @@ DocumentConverter converter = new DocumentConverter()
.disableDefaultStyleMap();
```
+#### Bold
+
+By default, bold text is wrapped in `<strong>` tags.
+This behaviour can be changed by adding a style mapping for `b`.
+For instance, to wrap bold text in `<em>` tags:
+
+```java
+DocumentConverter converter = new DocumentConverter()
+ .addStyleMap("b => em");
+```
+
+#### Italic
+
+By default, italic text is wrapped in `<em>` tags.
+This behaviour can be changed by adding a style mapping for `i`.
+For instance, to wrap italic text in `<strong>` tags:
+
+```java
+DocumentConverter converter = new DocumentConverter()
+ .addStyleMap("i => strong");
+```
+
#### Underline
By default, the underlining of any text is ignored since underlining can be confused with links in HTML documents.
@@ -263,6 +285,28 @@ For instance, to match a paragraph with the style ID `Heading1`:
p.Heading1
```
+#### Bold
+
+Match explicitly bold text:
+
+```
+b
+```
+
+Note that this matches text that has had bold explicitly applied to it.
+It will not match any text that is bold because of its paragraph or run style.
+
+#### Italic
+
+Match explicitly italic text:
+
+```
+i
+```
+
+Note that this matches text that has had italic explicitly applied to it.
+It will not match any text that is italic because of its paragraph or run style.
+
#### Underline
Match explicitly underlined text: