diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2024-04-30 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2024-04-30 00:00:00 +0000 |
commit | b6be49f480391e20c58ce61b78128abb4a560b1b30990eda3591280074df8132 (patch) | |
tree | c7a43b205c60fb5914bcdd5b63eac3e669123dae9a6cafc62c052c121767c726 | |
parent | 9ebfc99f09478129f3d6e0486403ce36eb5556b3b8e7d70efd01ca92370d3cbc (diff) |
Explicitly return only the first match
-rw-r--r-- | layouts/_default/single.gmi | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index 3072add..1ebe56f 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -14,7 +14,7 @@ {{ $scratch := newScratch -}} {{/* if content begins with a heading, add an extra newline */ -}} -{{ if (findRE `(?)^#{1,6} ` $content) }} +{{ if (findRE `^#{1,6} ` $content 1) }} {{ end -}} {{/* split text into chunks, with each chunk containing 3 parts: above, within, and below preformatted text */ -}} |