Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement an underline extension. (#103)
Closes #101.
- Loading branch information
Showing
8 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
# Underline | ||
|
||
With the flag `MD_FLAG_UNDERLINE`, MD4C sees underscore `_` rather as a mark | ||
denoting an underlined span rather then an ordinary emphasis (or a strong | ||
emphasis). | ||
|
||
```````````````````````````````` example | ||
_foo_ | ||
. | ||
<p><u>foo</u></p> | ||
```````````````````````````````` | ||
|
||
In sequences of multiple underscores, each single one translates into an | ||
underline span mark. | ||
|
||
```````````````````````````````` example | ||
___foo___ | ||
. | ||
<p><u><u><u>foo</u></u></u></p> | ||
```````````````````````````````` | ||
|
||
Intra-word underscores are not recognized as underline marks: | ||
|
||
```````````````````````````````` example | ||
foo_bar_baz | ||
. | ||
<p>foo_bar_baz</p> | ||
```````````````````````````````` | ||
|
||
Also the parser follows the standard understanding when the underscore can | ||
or cannot open or close a span. Therefore there is no underline in the following | ||
example because no underline can be seen as a closing mark. | ||
|
||
```````````````````````````````` example | ||
_foo _bar | ||
. | ||
<p>_foo _bar</p> | ||
```````````````````````````````` |