src/post2html: Disable TeX-style tie parsing in fences
Code fences are meant to indicate literal text, not formatted.master
parent
8d45c27edc
commit
88b9b2dee2
|
@ -98,11 +98,11 @@ prefmt()
|
|||
}
|
||||
|
||||
# ties
|
||||
{ $0 = gensub( /([^\\])~/, "\\1 ", "g" ) }
|
||||
{ $0 = gensub( /\\~/, "~", "g" ) }
|
||||
!infence { $0 = gensub( /([^\\])~/, "\\1 ", "g" ) }
|
||||
!infence { $0 = gensub( /\\~/, "~", "g" ) }
|
||||
|
||||
# TeX-style newline removal
|
||||
/%$/ {
|
||||
!infence && /%$/ {
|
||||
gsub( /%$/, "" )
|
||||
printf "%s", $0
|
||||
triml = 1
|
||||
|
@ -113,6 +113,7 @@ prefmt()
|
|||
# code block is HTML and we want to render it as an example)
|
||||
/^```/ {
|
||||
gather = !gather
|
||||
infence = gather
|
||||
if ( gather ) gblock = ""
|
||||
}
|
||||
!/^```/ && gather { gblock = gblock $0 "\n" }
|
||||
|
|
Loading…
Reference in New Issue