Fix incorrect regex: asterisks don't need to be quoted when used in a character set. This incorrectly included the backslash into the character set.
This commit is contained in:
parent
ee7a558a1d
commit
2ac267e68f
4
md2tex
4
md2tex
@ -45,8 +45,8 @@ function inline(text) {
|
||||
gsub(/&/, "\\\\&", text)
|
||||
gsub(/\^/, "\\textasciicircum ", text)
|
||||
gsub(/\.{3,}/, "\\ldots", text)
|
||||
text = gensub(/\*\*([^\*]*)\*\*/, "\\textbf{\\1}", "g", text)
|
||||
text = gensub(/\*([^\*]*)\*/, "\\emph{\\1}", "g", text)
|
||||
text = gensub(/\*\*([^*]+)\*\*/, "\\textbf{\\1}", "g", text)
|
||||
text = gensub(/\*([^*]+)\*/, "\\emph{\\1}", "g", text)
|
||||
text = gensub(/`([^`]*)`/, "\\texttt{\\1}", "g", text)
|
||||
# links
|
||||
text = gensub(/\[(.*)\]\((.*)\)/, "\\href{\\2}{\\1}\\footnote{\\url{\\2}}", "g", text)
|
||||
|
Loading…
Reference in New Issue
Block a user