aboutsummaryrefslogtreecommitdiff
path: root/v2/src/bin/html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xv2/src/bin/html10
1 files changed, 5 insertions, 5 deletions
diff --git a/v2/src/bin/html b/v2/src/bin/html
index f995753..578c539 100755
--- a/v2/src/bin/html
+++ b/v2/src/bin/html
@@ -68,7 +68,7 @@ eval "$(assert_arg "$FILENAME" 'FILENAME')"
# shellcheck source=/dev/null
-. "${FILENAME%.md}.conf"
+. "${FILENAME%.*}.conf"
#
# Utility functions
@@ -99,7 +99,7 @@ markdown_to_html() {
}
extract_plaintext_snippets() (
- SNIPPETS="${FILENAME%.md}.snippets"
+ SNIPPETS="${FILENAME%.*}.snippets"
printf '' > "$SNIPPETS"
F="$(mkstemp)"
cat > "$F"
@@ -117,7 +117,7 @@ extract_plaintext_snippets() (
if printf '%s' "$line" | grep -q "^$INDENT<pre><code"; then
IN_BLOCK=1
- OUT="${FILENAME%.md}.html.$BLOCK_NUMBER.txt"
+ OUT="${FILENAME%.*}.html.$BLOCK_NUMBER.txt"
BLOCK_NUMBER=$((BLOCK_NUMBER + 1))
printf '%s\n' "$line" |
sed "s|^\($INDENT<pre><code.*>\)\(.*\)$|\2|" |
@@ -205,7 +205,7 @@ warn_duplicate_ids() {
}
emit_body() {
- < "${FILENAME%.md}.content" \
+ < "${FILENAME%.*}.content" \
markdown_to_html |
extract_plaintext_snippets |
add_line_numbers |
@@ -214,5 +214,5 @@ emit_body() {
}
envsubst < src/lib/preamble.html
-emit_body | tee "${FILENAME%.md}.htmlbody"
+emit_body | tee "${FILENAME%.*}.htmlbody"
envsubst < src/lib/postamble.html