Modifier and Type | Class and Description |
---|---|
static class |
Options.FencedCodeBlocks
Provides settings to configure if fenced code blocks are used.
|
static class |
Options.InWordEmphasis
Provides options for how to handle in-word emphasis.
|
static class |
Options.Tables
Provides settings to control how Tables are converted.
|
Modifier and Type | Field and Description |
---|---|
boolean |
abbreviations
If true, enable remarking abbreviations.
|
boolean |
autoLinks
If true, enable autoLinks.
|
boolean |
definitionLists
If true, enable remarking definitions lists.
|
Options.FencedCodeBlocks |
fencedCodeBlocks
Configures how to handle code blocks.
|
int |
fencedCodeBlocksWidth
Number of times to repeat the fencedCodeBlock character.
|
boolean |
fixPegdownStrongEmphasisInLinks
This is a very specific fix for a very specific bug.
|
boolean |
hardwraps
If true,
<br/> s are replaced with a simple linebreak. |
boolean |
headerIds
If true, enable remarking header IDs.
|
Set<IgnoredHtmlElement> |
ignoredHtmlElements
Allows the addition of extra HTML tags that can be left in the output.
|
boolean |
inlineLinks
If true, place the URLs for links inline.
|
Options.InWordEmphasis |
inWordEmphasis
Configures how in-word emphasis is handled.
|
boolean |
preserveRelativeLinks
If true, relative links are preserved.
|
boolean |
reverseHtmlSmartPunctuation
If true, replace all smart punctuation HTML entities (e.g:
&emdash; ) with simplified characters (e.g: --- ). |
boolean |
reverseHtmlSmartQuotes
If true, replace all smart quote HTML entities (e.g:
“ with simplified characters (e.g: " ). |
boolean |
reverseUnicodeSmartPunctuation
If true, replace all smart punctuation unicode characters (e.g:
) with simplified characters (e.g:
--- ). |
boolean |
reverseUnicodeSmartQuotes
If true, replace all smart quote unicode characters (e.g:
) with simplified characters (e.g:
" ). |
boolean |
simpleLinkIds
If true, link IDs are simply incremented as they are found.
|
Options.Tables |
tables
Configures how tables are handled.
|
Constructor and Description |
---|
Options()
Configures a default set of options.
|
Modifier and Type | Method and Description |
---|---|
Options |
getCopy() |
Options.FencedCodeBlocks |
getFencedCodeBlocks()
Always returns a non-null setting for FencedCodeBlocks
|
Set<IgnoredHtmlElement> |
getIgnoredHtmlElements()
Always returns a non-null setting for IgnoredHtmlElements
|
Options.InWordEmphasis |
getInWordEmphasis()
Always returns a non-null setting for InWordEmphasis
|
Options.Tables |
getTables()
Always returns a non-null setting for Tables
|
static Options |
github()
Creates and returns a new Options set with the default options
compatible with github-flavored Markdown.
|
static Options |
markdown()
Creates and returns a new Options set with the default options
compatible with the original Markdown.
|
static Options |
markdownExtra()
Creates and returns a new Options set with the default options
compatible with PHP Markdown Extra features.
|
static Options |
multiMarkdown()
Creates and returns a new Options set with the default options
compatible with MultiMarkdown features.
|
static Options |
pegdownAllExtensions()
Creates and returns a new Options set with the default options
compatible with pegdown configured with all extensions.
|
static Options |
pegdownBase()
Creates and returns a new Options set with the default options
compatible with the base pegdown configuration.
|
void |
setReverseAllSmarts(boolean reverse)
Utility method to set reversing of both unicode and html
smart quotes and punctuation.
|
void |
setReverseSmartPunctuation(boolean reverse)
Utility method to set reversing of both unicode and html
smart punctuation.
|
void |
setReverseSmartQuotes(boolean reverse)
Utility method to set reversing of both unicode and html
smart quotes.
|
public boolean hardwraps
<br/>
s are replaced with a simple linebreak.
If false, <br/>
s are replaced with a two spaces followed by a linebreak (default).
public Options.InWordEmphasis inWordEmphasis
public boolean preserveRelativeLinks
Otherwise, relative links are resolved against the provided baseURI (the default).
public boolean inlineLinks
Otherwise, generate link IDs and place at the end (the default).
public boolean simpleLinkIds
Otherwise, Remark attempts to generate unique link IDs based on the link description.
public Options.Tables tables
public boolean reverseHtmlSmartQuotes
“
with simplified characters (e.g: "
).public boolean reverseUnicodeSmartQuotes
"
).public boolean reverseHtmlSmartPunctuation
&emdash;
) with simplified characters (e.g: ---
).public boolean reverseUnicodeSmartPunctuation
---
).public boolean definitionLists
<dl>
, <dt>
, and <dd>
)
are converted into PHP Markdown Extra style definition lists.public boolean abbreviations
<abbr>
tags are converted
into PHP Markdown Extra style abbreviations.public boolean autoLinks
href
attribute is the same
as the node's inner text content. In this case, the URL is simply written directly to the
output.
Example:
<a href="http://www.example.com">http://www.example.com</a>
becomes
http://www.example.com
public boolean headerIds
public Options.FencedCodeBlocks fencedCodeBlocks
public int fencedCodeBlocksWidth
public Set<IgnoredHtmlElement> ignoredHtmlElements
<em>
tags).public boolean fixPegdownStrongEmphasisInLinks
[***my important link***][link-id]
with just
bold text, like [**my important link**][link-id]
.
Note: this was fixed in release 1.1.0!public Options()
public static Options markdown()
public static Options markdownExtra()
Enables:
public static Options multiMarkdown()
Enables:
public static Options pegdownBase()
Please note: if you are using pegdown version 1.0.2 or older, you'll need to
manually enable fixPegdownStrongEmphasisInLinks
.
Enables:
public static Options pegdownAllExtensions()
Please note: if you are using pegdown version 1.0.2 or older, you'll need to
manually enable fixPegdownStrongEmphasisInLinks
.
Enables:
public static Options github()
Enables:
public Options.FencedCodeBlocks getFencedCodeBlocks()
public Set<IgnoredHtmlElement> getIgnoredHtmlElements()
public Options.Tables getTables()
public Options.InWordEmphasis getInWordEmphasis()
public void setReverseSmartQuotes(boolean reverse)
reverse
- true if they should be reversedpublic void setReverseSmartPunctuation(boolean reverse)
reverse
- true if they should be reversedpublic void setReverseAllSmarts(boolean reverse)
reverse
- true if they should be reversedpublic Options getCopy()
Copyright © 2017. All rights reserved.