regexp escape sequence `\"' is not a known regexp operator for gawk
This commit is contained in:
parent
6c831dc78f
commit
a59d19fa3d
10
md2html
10
md2html
@ -63,7 +63,7 @@ function escape(text) {
|
||||
gsub(/&/, "\\&", text)
|
||||
gsub(/</, "\\<", text)
|
||||
gsub(/>/, "\\>", text)
|
||||
gsub(/\"/, "\\"", text)
|
||||
gsub(/"/, "\\"", text)
|
||||
return text
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ function escape(text) {
|
||||
gsub(/&/, "\\&", text)
|
||||
gsub(/</, "\\<", text)
|
||||
gsub(/>/, "\\>", text)
|
||||
gsub(/\"/, "\\"", text)
|
||||
gsub(/"/, "\\"", text)
|
||||
return text
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ function inline(text) {
|
||||
|
||||
/<body lang=/ {
|
||||
lang=$0
|
||||
gsub(/^.*lang=\"*/,"",lang)
|
||||
gsub(/^.*lang="*/,"",lang)
|
||||
gsub(/[^a-z].*$/,"",lang)
|
||||
level("summary")
|
||||
oneliner("h2", tocname[lang])
|
||||
@ -260,8 +260,8 @@ function inline(text) {
|
||||
|
||||
/<h[2-6] / {
|
||||
id=$0
|
||||
gsub(/^.*id=\"/,"",id)
|
||||
gsub(/\">.*$/,"",id)
|
||||
gsub(/^.*id="/,"",id)
|
||||
gsub(/">.*$/,"",id)
|
||||
d=$1
|
||||
gsub(/^<h/, "", d)
|
||||
gsub(/ *<[^>]*>/, "", $0)
|
||||
|
Loading…
Reference in New Issue
Block a user