Skip to content

Commit f91a111

Browse files
committed
un-escape in text (e.g. in grass.html#examples)
1 parent 80c5ce5 commit f91a111

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

utils/grass_html2md.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,12 @@ for f in $(find . -name *.html); do
5757
s|_KEEPHTML">|">|g;
5858
' "${f%%.html}.html" > "${f%%.html}_tmp.html"
5959

60-
cat "${f%%.html}_tmp.html" | sed 's#<div class="code"><pre>#<pre><code>#g' | sed 's#</pre></div>#</code></pre>#g' | pandoc \
61-
--from=html --to=markdown -t gfm --lua-filter "${UTILSPATH}/pandoc_codeblock.lua" > "${f%%.html}.md"
60+
cat "${f%%.html}_tmp.html" | \
61+
sed 's#<div class="code"><pre>#<pre><code>#g' | \
62+
sed 's#</pre></div>#</code></pre>#g' | \
63+
pandoc --from=html --to=markdown -t gfm \
64+
--lua-filter "${UTILSPATH}/pandoc_codeblock.lua" | \
65+
sed 's+ \\\$+ \$+g' > "${f%%.html}.md"
6266

6367
rm -f "${f%%.html}_tmp.html"
6468

0 commit comments

Comments
 (0)