diff --git a/html.go b/html.go
index 264aae5..74e67ee 100644
--- a/html.go
+++ b/html.go
@@ -39,7 +39,8 @@ const (
HTML_USE_XHTML // generate XHTML output instead of HTML
HTML_USE_SMARTYPANTS // enable smart punctuation substitutions
HTML_SMARTYPANTS_FRACTIONS // enable smart fractions (with HTML_USE_SMARTYPANTS)
- HTML_SMARTYPANTS_LATEX_DASHES // enable LaTeX-style dashes (with HTML_USE_SMARTYPANTS)
+ HTML_SMARTYPANTS_DASHES // enable smart dashes (with HTML_USE_SMARTYPANTS)
+ HTML_SMARTYPANTS_LATEX_DASHES // enable LaTeX-style dashes (with HTML_USE_SMARTYPANTS and HTML_SMARTYPANTS_DASHES)
HTML_SMARTYPANTS_ANGLED_QUOTES // enable angled double quotes (with HTML_USE_SMARTYPANTS) for double quotes rendering
HTML_FOOTNOTE_RETURN_LINKS // generate a link at the end of a footnote to return to the source
)
diff --git a/markdown.go b/markdown.go
index 121f946..1e3fa93 100644
--- a/markdown.go
+++ b/markdown.go
@@ -50,6 +50,7 @@ const (
HTML_USE_XHTML |
HTML_USE_SMARTYPANTS |
HTML_SMARTYPANTS_FRACTIONS |
+ HTML_SMARTYPANTS_DASHES |
HTML_SMARTYPANTS_LATEX_DASHES
commonExtensions = 0 |
diff --git a/smartypants.go b/smartypants.go
index 8027571..eeffa5e 100644
--- a/smartypants.go
+++ b/smartypants.go
@@ -378,10 +378,12 @@ func smartypants(flags int) *smartypantsRenderer {
}
r['\''] = smartSingleQuote
r['('] = smartParens
- if flags&HTML_SMARTYPANTS_LATEX_DASHES == 0 {
- r['-'] = smartDash
- } else {
- r['-'] = smartDashLatex
+ if flags&HTML_SMARTYPANTS_DASHES != 0 {
+ if flags&HTML_SMARTYPANTS_LATEX_DASHES == 0 {
+ r['-'] = smartDash
+ } else {
+ r['-'] = smartDashLatex
+ }
}
r['.'] = smartPeriod
if flags&HTML_SMARTYPANTS_FRACTIONS == 0 {