summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-08-24 15:24:17 +0100
committerPaul Buetow <paul@buetow.org>2024-08-24 15:24:17 +0100
commitd64661ccdf837bb66c3268cb4415c56ba033f515 (patch)
treed42095bcebad6a59954b61ac069a3bf9adc4925b /lib
parent818e1db0599119b428436b4c2547b759150dd621 (diff)
initial atom.xml fixes
Diffstat (limited to 'lib')
-rw-r--r--lib/html.source.sh6
-rw-r--r--lib/md.source.sh2
-rw-r--r--lib/template.source.sh4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/html.source.sh b/lib/html.source.sh
index 382f5e7..4be36df 100644
--- a/lib/html.source.sh
+++ b/lib/html.source.sh
@@ -141,7 +141,7 @@ html::source_highlight () {
html::list::encode () {
local text="$1"; shift
- if [[ "$text" != '.'* ]]; then
+ if [[ "$text" != ':'* ]]; then
# No ToC
html::encode "$text"
return
@@ -150,8 +150,8 @@ html::list::encode () {
local -i toc_indent=0
# If there's a . (dot) in the liste element, it then indicates a ToC element
- while [[ "$text" == '.'* ]]; do
- text="$($SED 's/\.//' <<< "$text")"
+ while [[ "$text" == ':'* ]]; do
+ text="$($SED 's/://' <<< "$text")"
: $(( toc_indent++ ))
done
diff --git a/lib/md.source.sh b/lib/md.source.sh
index 667d5c9..8478812 100644
--- a/lib/md.source.sh
+++ b/lib/md.source.sh
@@ -38,7 +38,7 @@ md::fromgmi () {
'=> '*)
generate::make_link md "$line"
;;
- '* .'*)
+ '* :'*)
echo -n '* '
md::make_toc_link "${line/\* /}"
;;
diff --git a/lib/template.source.sh b/lib/template.source.sh
index f6b25a9..7689728 100644
--- a/lib/template.source.sh
+++ b/lib/template.source.sh
@@ -97,8 +97,8 @@ template::inline::toc () {
< "$(basename "$CURRENT_TPL")" $SED -E -n '
/^```/,/^```/! {
/^#+ / {
- s/#/* ./
- s/#/./g
+ s/#/* :/
+ s/#/:/g
p
}
}