Merge fee6c5a361
into 4c9bf95126
commit
eacda511f5
1
html.go
1
html.go
|
@ -46,6 +46,7 @@ const (
|
|||
SmartypantsLatexDashes // Enable LaTeX-style dashes (with Smartypants)
|
||||
SmartypantsAngledQuotes // Enable angled double quotes (with Smartypants) for double quotes rendering
|
||||
SmartypantsQuotesNBSP // Enable « French guillemets » (with Smartypants)
|
||||
SmartypantsParens // Enable smart parens (with Smartypants)
|
||||
TOC // Generate a table of contents
|
||||
)
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ const (
|
|||
DefinitionLists // Render definition lists
|
||||
|
||||
CommonHTMLFlags HTMLFlags = UseXHTML | Smartypants |
|
||||
SmartypantsFractions | SmartypantsDashes | SmartypantsLatexDashes
|
||||
SmartypantsFractions | SmartypantsDashes | SmartypantsLatexDashes | SmartypantsParens
|
||||
|
||||
CommonExtensions Extensions = NoIntraEmphasis | Tables | FencedCode |
|
||||
Autolink | Strikethrough | SpaceHeadings | HeadingIDs |
|
||||
|
|
|
@ -411,7 +411,9 @@ func NewSmartypantsRenderer(flags HTMLFlags) *SPRenderer {
|
|||
}
|
||||
}
|
||||
r.callbacks['\''] = r.smartSingleQuote
|
||||
r.callbacks['('] = r.smartParens
|
||||
if flags&SmartypantsParens != 0 {
|
||||
r.callbacks['('] = r.smartParens
|
||||
}
|
||||
if flags&SmartypantsDashes != 0 {
|
||||
if flags&SmartypantsLatexDashes == 0 {
|
||||
r.callbacks['-'] = r.smartDash
|
||||
|
|
Loading…
Reference in New Issue