From dd47d57e4da6f5ab12e75d81b34f735be5f3cc68 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 16 Aug 2017 21:13:23 -0700 Subject: [PATCH] doc/rdsrc: don't treat \# as a comment marker if preceeded by \ We need to be able to let \\# represent a literal \#, rather than be \ followed by a comment. Signed-off-by: H. Peter Anvin --- doc/rdsrc.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/rdsrc.pl b/doc/rdsrc.pl index 129bb085..1ca71681 100644 --- a/doc/rdsrc.pl +++ b/doc/rdsrc.pl @@ -237,7 +237,7 @@ sub get_para($_) { $para = undef; } if (/\S/) { - s/\\#.*$//; # strip comments + s/(^|[^\\])\\#.*$/\1/; # strip comments $para .= " " . $_; } }