diff options
Diffstat (limited to 'convert.sed')
-rwxr-xr-x | convert.sed | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/convert.sed b/convert.sed new file mode 100755 index 0000000..2449d1f --- /dev/null +++ b/convert.sed @@ -0,0 +1,31 @@ +#!/bin/sed -f + +/data-href/s/&/&/g + +# xsltproc --html doesnt understand html5 +s/section/div/g +s/header/h1/g +s/<nav/<div/g +s:</nav:</div:g +s/footer/div/g +s/article/div/g + +# Fix incorrect < and > inside p tags, that is by allowing only +# known tag be surrounded by < and >. +ta +:a +s/<p>\(.*\)<\/p>/\1/ +tfix +b + +:fix +s/</\</g +s/>/\>/g + +s/<span\([^;]*\)>/<span\1>/g +s/<\/span>/<\/span>/g + +s/\<em\>/<em>/g +s/\<\/em\>/<\/em>/g + +s:.*:<p>&</p>: |