<tr>
<td class="purpose-title">Purpose:</td>
<td class="purpose-description" colspan="2">Enable/Disable smart punctuation substitutions such as smart quotes, smart dashes, etc.
-May be fine-tuned with the <code>angledQuotes</code>, <code>fractions</code> and <code>latexDashes</code> flags below.</td>
+May be fine-tuned with the <code>angledQuotes</code>, <code>fractions</code>, <code>smartDashes</code> and <code>latexDashes</code> flags below.</td>
</tr>
<tr>
but only these three.</small></td>
</tr>
+<tr>
+<td><code><strong>smartDashes</strong></code></td>
+<td><code>true</code></td>
+<td><code>HTML_SMARTYPANTS_DASHES</code></td>
+</tr>
+<tr>
+<td class="purpose-title">Purpose:</td>
+<td class="purpose-description" colspan="2">Enable/Disable smart dashes, i.e. turning hyphens into en dash or em dash.<br>
+Its behavior can be modified with the <code>latexDashes</code> flag listed below.</td>
+</tr>
+
<tr>
<td><code><strong>latexDashes</strong></code></td>
<td><code>true</code></td>
AngledQuotes bool
Fractions bool
HrefTargetBlank bool
+ SmartDashes bool
LatexDashes bool
PlainIDAnchors bool
Extensions []string
AngledQuotes: false,
Fractions: true,
HrefTargetBlank: false,
+ SmartDashes: true,
LatexDashes: true,
PlainIDAnchors: false,
}
htmlFlags |= blackfriday.HTML_HREF_TARGET_BLANK
}
+ if ctx.getConfig().SmartDashes {
+ htmlFlags |= blackfriday.HTML_SMARTYPANTS_DASHES
+ }
+
if ctx.getConfig().LatexDashes {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_LATEX_DASHES
}