Refine multi line codeblock formating
Some shells set the line background for complete terminal width instead of only the available characters to print
This commit is contained in:
7
catmd.sh
7
catmd.sh
@@ -190,12 +190,15 @@ parseline() {
|
|||||||
5) ## Multiline code blocks ##
|
5) ## Multiline code blocks ##
|
||||||
if [[ "$tocheck" =~ $rex_codeblock ]]; then
|
if [[ "$tocheck" =~ $rex_codeblock ]]; then
|
||||||
if isfix; then
|
if isfix; then
|
||||||
format_suffix="${FO_RESET}"
|
|
||||||
unfix
|
unfix
|
||||||
else
|
else
|
||||||
format_prefix="${FO_CODEBLOCK}"
|
|
||||||
fix
|
fix
|
||||||
fi
|
fi
|
||||||
|
format_prefix="${FO_CODEBLOCK}"
|
||||||
|
format_suffix="${FO_RESET}"
|
||||||
|
elif isfix; then
|
||||||
|
format_prefix="${FO_CODEBLOCK}"
|
||||||
|
format_suffix="${FO_RESET}"
|
||||||
fi
|
fi
|
||||||
fall || break;;
|
fall || break;;
|
||||||
6) ## Code block started with spaces
|
6) ## Code block started with spaces
|
||||||
|
Reference in New Issue
Block a user