From aa2de3f5791914569b122a61bf7370b0737a0a6c Mon Sep 17 00:00:00 2001 From: anenviousguest Date: Mon, 4 Dec 2023 10:25:51 +0100 Subject: [PATCH] Fix: strip _any_ trailing line break character from the titles Otherwise, when parsing *.md files with windows-style line breaks (CR-LF), one of the line break characters would remain in the title, thus breaking the markup for the table of content. --- src/_adr_title | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_adr_title b/src/_adr_title index 92ab09c..e82e050 100755 --- a/src/_adr_title +++ b/src/_adr_title @@ -2,4 +2,4 @@ set -e eval "$($(dirname $0)/adr-config)" -head -1 $("$adr_bin_dir/_adr_file" "$1") | cut -c 3- +head -1 $("$adr_bin_dir/_adr_file" "$1") | cut -c 3- | tr -d '\r\n'