diff options
Diffstat (limited to 'http')
| -rwxr-xr-x | http/bin/gmi2upphtml | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/http/bin/gmi2upphtml b/http/bin/gmi2upphtml index 1631037..0d16c56 100755 --- a/http/bin/gmi2upphtml +++ b/http/bin/gmi2upphtml @@ -165,15 +165,22 @@ do if [ "$(echo "$line" | cut -c1-3)" = "\`\`\`" ] then - close_all_open_blocks_except pre if [ $is_in_preformatted_block -eq 0 ] then + close_all_open_blocks_except pre echo "<pre>" + is_in_preformatted_block=1 + echo "$(escape_upphtml "$(echo "$line" | cut -c4-)")" else - echo -e "\n" + echo "</pre>" + is_in_preformatted_block=0 fi - is_in_preformatted_block=1 - echo "$(escape_upphtml "$(echo "$line" | cut -c4-)")" + continue + fi + + if [ $is_in_preformatted_block -ne 0 ] + then + echo "$(escape_upphtml "${line}")" continue fi |
