Skip to content

Commit 8a1e28a

Browse files
committed
add doc to html parser overview
1 parent fd62edd commit 8a1e28a

6 files changed

Lines changed: 68 additions & 6 deletions

File tree

.idea/markdown-exported-files.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/scopes/Flexmark_Ext_Overview.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flexmark-formatter/src/main/javadoc/overview.html

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,36 @@
22
<head>
33
</head>
44
<body>
5-
<p><strong>flexmark-java extension for formatter processing</strong></p>
6-
<p>Converts formatter syntax into blah, blah, blah.</p>
5+
<p><strong>flexmark-java markdown formatter module</strong></p>
6+
<p>Outputs AST as formatted Markdown with user configurable options.</p>
7+
<p>Options for output control, pass via <code>DataHolder</code> taking method <code>parse()</code> method. The following
8+
options are available:</p>
9+
<p>Defined in <code>TaskListExtension</code> class:</p>
10+
<ul>
11+
<li><code>FlexmarkHtmlParser.LIST_CONTENT_INDENT</code>, default <code>true</code>, continuation lines of list items and
12+
definitions indent to content column otherwise 4 spaces</li>
13+
<li><code>FlexmarkHtmlParser.SETEXT_HEADINGS</code>, default <code>true</code>, if true then use Setext headings for h1
14+
and h2</li>
15+
<li><code>FlexmarkHtmlParser.OUTPUT_UNKNOWN_TAGS</code>, default <code>false</code>, when true unprocessed tags will be
16+
output, otherwise they are ignored</li>
17+
<li><code>FlexmarkHtmlParser.ORDERED_LIST_DELIMITER</code>, default <code>'.'</code>, delimiter for ordered items</li>
18+
<li><code>FlexmarkHtmlParser.UNORDERED_LIST_DELIMITER</code>, default <code>'*'</code>, delimiter for unordered list
19+
items</li>
20+
<li><code>FlexmarkHtmlParser.DEFINITION_MARKER_SPACES</code>, default <code>3</code>, min spaces after <code>:</code> for
21+
definitions</li>
22+
<li><code>FlexmarkHtmlParser.MIN_TABLE_SEPARATOR_COLUMN_WIDTH</code>, default <code>1</code>, min 1, minimum number of
23+
<code>-</code> in separator column, excluding alignment colons <code>:</code></li>
24+
<li><code>FlexmarkHtmlParser.MIN_TABLE_SEPARATOR_DASHES</code>, default <code>3</code>, min 3, minimum separator column
25+
width, including alignment colons <code>:</code></li>
26+
<li><code>FlexmarkHtmlParser.MIN_SETEXT_HEADING_MARKER_LENGTH</code>, default <code>3</code>, min 3, minimum setext
27+
heading marker length</li>
28+
<li><code>FlexmarkHtmlParser.CODE_INDENT</code>, default 4 spaces, indent to use for indented code</li>
29+
<li><code>FlexmarkHtmlParser.EOL_IN_TITLE_ATTRIBUTE</code>, default <code>&quot; &quot;</code>, string to use in place of EOL in
30+
image and link title attribute.</li>
31+
<li><code>FlexmarkHtmlParser.NBSP_TEXT</code>, default <code>&quot; &quot;</code>, string to use in place of non-break-space</li>
32+
<li><code>FlexmarkHtmlParser.THEMATIC_BREAK</code>, default <code>&quot;*** ** * ** ***&quot;</code>, <code>&lt;hr&gt;</code> replacement</li>
33+
</ul>
34+
<p>Uses the excellent <a href="https://jsoup.org/">jsoup</a> HTML parsing library and emoji shortcuts using
35+
<a href="http://www.emoji-cheat-sheet.com/">Emoji-Cheat-Sheet.com</a></p>
736
</body>
837
</html>
Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
11
**flexmark-java markdown formatter module**
22

3-
Outputs AST as Formatted Markdown with user configurable options.
3+
Outputs AST as formatted Markdown with user configurable options.
4+
5+
Options for output control, pass via `DataHolder` taking method `parse()` method. The following
6+
options are available:
7+
8+
Defined in `TaskListExtension` class:
9+
10+
* `FlexmarkHtmlParser.LIST_CONTENT_INDENT`, default `true`, continuation lines of list items and
11+
definitions indent to content column otherwise 4 spaces
12+
* `FlexmarkHtmlParser.SETEXT_HEADINGS`, default `true`, if true then use Setext headings for h1
13+
and h2
14+
* `FlexmarkHtmlParser.OUTPUT_UNKNOWN_TAGS`, default `false`, when true unprocessed tags will be
15+
output, otherwise they are ignored
16+
* `FlexmarkHtmlParser.ORDERED_LIST_DELIMITER`, default `'.'`, delimiter for ordered items
17+
* `FlexmarkHtmlParser.UNORDERED_LIST_DELIMITER`, default `'*'`, delimiter for unordered list
18+
items
19+
* `FlexmarkHtmlParser.DEFINITION_MARKER_SPACES`, default `3`, min spaces after `:` for
20+
definitions
21+
* `FlexmarkHtmlParser.MIN_TABLE_SEPARATOR_COLUMN_WIDTH`, default `1`, min 1, minimum number of
22+
`-` in separator column, excluding alignment colons `:`
23+
* `FlexmarkHtmlParser.MIN_TABLE_SEPARATOR_DASHES`, default `3`, min 3, minimum separator column
24+
width, including alignment colons `:`
25+
* `FlexmarkHtmlParser.MIN_SETEXT_HEADING_MARKER_LENGTH`, default `3`, min 3, minimum setext
26+
heading marker length
27+
* `FlexmarkHtmlParser.CODE_INDENT`, default 4 spaces, indent to use for indented code
28+
* `FlexmarkHtmlParser.EOL_IN_TITLE_ATTRIBUTE`, default `" "`, string to use in place of EOL in
29+
image and link title attribute.
30+
* `FlexmarkHtmlParser.NBSP_TEXT`, default `" "`, string to use in place of non-break-space
31+
* `FlexmarkHtmlParser.THEMATIC_BREAK`, default `"*** ** * ** ***"`, `<hr>` replacement
32+
33+
Uses the excellent [jsoup](https://jsoup.org/) HTML parsing library and emoji shortcuts using
34+
[Emoji-Cheat-Sheet.com](http://www.emoji-cheat-sheet.com/)
35+

flexmark-html-parser/src/main/javadoc/overview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<li>bullet and numbered lists</li>
1313
<li>definition</li>
1414
<li>fenced code</li>
15-
<li>strikethrough</li>
15+
<li>strike through</li>
1616
<li>subscript</li>
1717
<li>superscript</li>
1818
<li>tables</li>

flexmark-html-parser/src/main/javadoc/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Converts HTML to Markdown, assumes all non-application specific extensions are g
99
* bullet and numbered lists
1010
* definition
1111
* fenced code
12-
* strikethrough
12+
* strike through
1313
* subscript
1414
* superscript
1515
* tables

0 commit comments

Comments
 (0)