aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-03-25 11:21:15 +0000
committerMichael Williamson <mike@zwobble.org>2016-03-25 11:21:15 +0000
commit1a8f31f98621904110b78b2598757edad79963fe (patch)
treed0ca86da0808fde9599c086088d5759fd4bd0895
parente9ed8085ac7a808d7ad83b4b7e1d6be8a41a6c94 (diff)
Document idPrefix
-rw-r--r--README.md4
-rw-r--r--src/main/java/org/zwobble/mammoth/DocumentConverter.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index 98c1166..a929637 100644
--- a/README.md
+++ b/README.md
@@ -201,6 +201,10 @@ Methods:
* `DocumentConverter preserveEmptyParagraphs()`: by default, empty paragraphs are ignored.
Call this to preserve empty paragraphs in the output.
+* `DocumentConverter idPrefix(String idPrefix)`:
+ A string to prepend to any generated IDs,
+ such as those used by bookmarks, footnotes and endnotes.
+
#### `Result<T>`
Represents the result of a conversion. Methods:
diff --git a/src/main/java/org/zwobble/mammoth/DocumentConverter.java b/src/main/java/org/zwobble/mammoth/DocumentConverter.java
index 94fb09c..b523bba 100644
--- a/src/main/java/org/zwobble/mammoth/DocumentConverter.java
+++ b/src/main/java/org/zwobble/mammoth/DocumentConverter.java
@@ -37,6 +37,10 @@ public class DocumentConverter {
this.options = options;
}
+ /**
+ * A string to prepend to any generated IDs,
+ * such as those used by bookmarks, footnotes and endnotes.
+ */
public DocumentConverter idPrefix(String idPrefix) {
return new DocumentConverter(options.idPrefix(idPrefix));
}