vim-jp/vim-jp.github.io

escape markdown

koron opened this issue · 2 comments

koron commented

when execute scripts/vimmagazinetools.rb generate, it may generate wrong markdown (see bdd092b).

it should be fixed that script.

koron commented

mdescape()

def mdescape(s)
s = s.gsub("\\", "\\\\\\\\")
s = s.gsub("<", "\\<")
s = s.gsub("[", "\\[")
s = s.gsub("]", "\\]")
s = s.gsub("`", "&#x60;")
s = s.gsub("_", "&#x5f;")
s = s.gsub("^", "&#x5e;")
s = s.gsub("*", "&#x2a;")
return s
end

no longer valid