From 6bc6d5fb6b72fb899587d7bd20caa2896d528c2d Mon Sep 17 00:00:00 2001
From: davidovki
Date: Fri, 3 Mar 2023 05:08:51 +0000
Subject: Fix paragraph
---
src/md2html.sh | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/md2html.sh b/src/md2html.sh
index 86ebc3d..bc21764 100755
--- a/src/md2html.sh
+++ b/src/md2html.sh
@@ -85,14 +85,16 @@ _p () {
empty=true
while IFS= read -r line; do
case "$line" in
- "#"*|">"*|"``"*)
- printf "%s\n" "$line"
+ "#"*|">"*|'``'*|'<'*'>'*)
+ $empty &&
+ printf "%s\n" "$line"
;;
"")
- $empty ||
+ $empty || {
printf "
\n"
-
- empty=true ;;
+ empty=true
+ }
+ ;;
*)
$empty &&
printf "%s " "$line" ||
@@ -250,10 +252,10 @@ _ol () {
#
md2html () {
- _p \
- | _pre_emph \
+ _pre_emph \
| _ul \
| _ol \
+ | _p \
| _emph '__' "" "" \
| _emph '_' "" "" \
| _emph '`' "" "
" \
--
cgit v1.2.1