Turn off Markdown interpretation of HTML blocks in markdown files
authorRichard Levitte <levitte@openssl.org>
Fri, 12 Jan 2024 07:47:11 +0000 (08:47 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 31 Jan 2024 11:34:15 +0000 (12:34 +0100)
Fixes openssl/project#394

Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/web/pull/447)

bin/fix-man-html [deleted file]
bin/md-to-html5
bin/strip-man-html

diff --git a/bin/fix-man-html b/bin/fix-man-html
deleted file mode 100755 (executable)
index 3caad2a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /usr/bin/env perl
-
-# The pod source may contain things that can be reinterpreted as markdown,
-# and thereby rendered incorrectly.  This script fixes that, usually by
-# replacing some character with the corresponding HTML character entity.
-
-local $/;                       # Slurp the whole file
-my $contents = <STDIN>;
-
-$contents =~ s|\]\(|\&rbrack;(|g; # ]( suggests a markdown link
-
-print $contents;
index 7a6aabd448fb92db6487f66e33e12c0e372b5b10..051d960c087fc7774e9d6c4e4935dd706d617ef2 100755 (executable)
@@ -177,7 +177,8 @@ for f in "$@"; do
         input_file="$HERE/../$f"
     fi
 
-    pandoc -t html5 -f markdown --template="$template" \
+    pandoc -t html5 -f markdown-markdown_in_html_blocks \
+        --template="$template" \
         --highlight-style="$highlightstyle" \
         --tab-stop=8 --shift-heading-level-by=1 \
         -M author-meta='OpenSSL Foundation, Inc.' \
index 0a1bf168bb4ad349452fd90bf5d20fc710c043a7..fb50971ca53433d7938d5de867bbc281603d4e73 100755 (executable)
@@ -15,7 +15,5 @@ $contents = $`;                 # </body> and everything after is stripped
 
 # Adapt all H tags to be wrapped inside H1 and H2
 $contents =~ s@(</?h)(\d)(\s|>)@$1.($2 + 2).$3@emg;
-#added from /bin/fix-man-html
-$contents =~ s|\]\(|\&rbrack;(|g; # ]( suggests a markdown link
 
 print $contents;