Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GFM parser: quirk to disable auto typographic symbol conversion
With GFM, we want to be as close as possible to GitHub Flavored Markdown. In particular, GitHub does not replace -- with en-dash, --- with em-dash et cetera, and doing this not only breaks HTML rendering (resulting in, say, –option instead of --option). The above replacement also makes header IDs incompatible with those generated by GitHub, making it way harder to create a document with intralinks that work both on GitHub and kramdown-generated HTML. So, let's introduce another GFM quirk to turn off automatic typographic symbol conversion. NOTE it is off by default, i.e. needs to be explicitly enabled. For more details on the issue and examples, see #459 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
- Loading branch information
Showing
6 changed files
with
18 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h3 id="header-with---ndash">Header with --ndash</h3> | ||
|
||
<h3 id="with------typographic---symbols">with --- << typographic >> ... symbols</h3> |
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,3 @@ | ||
<h3 id="header-with---ndash">Header with --ndash</h3> | ||
|
||
<h3 id="with------typographic---symbols">with --- << typographic >> ... symbols</h3> |
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 @@ | ||
:gfm_quirks: [no_auto_typographic] |
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,3 @@ | ||
### Header with --ndash | ||
|
||
### with --- << typographic >> ... symbols |