commit 9f52afa60839 ("build: doc: Fix rendering of verbatim '\n"' in man pages") worked around a doxygen bug which was fixed at doxygen 1.9. Applying the workaround to output from a fixed doxygen version reintroduced the bug. Update build_man.sh to record doxygen version and only apply workaround if that version is broken. Fixes: 9f52afa60839 ("build: doc: Fix rendering of verbatim '\n"' in man pages") Signed-off-by: Duncan Roe <duncan_roe@xxxxxxxxxxxxxxx> --- doxygen/build_man.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doxygen/build_man.sh b/doxygen/build_man.sh index 95c7569..a6531cb 100755 --- a/doxygen/build_man.sh +++ b/doxygen/build_man.sh @@ -68,6 +68,13 @@ post_process(){ # #keep_me=nfq_icmp_get_hdr.3 #do_diagnostics + + # Decide if we need to fix rendering of verbatim "\n" + i=$(doxygen --version) + doxymajor=$(echo $i|cut -f1 -d.) + doxyminor=$(echo $i|cut -f2 -d.) + [ $doxymajor -eq 1 -a $doxyminor -lt 9 ] && + fix_newlines=true || fix_newlines=false # # Work through the "real" man pages for target in $(ls -S | head -n$page_count) @@ -84,7 +91,7 @@ post_process(){ [ $# -ne 2 ] || insert_see_also $@ # Fix rendering of verbatim "\n" (in code snippets) - sed -i 's/\\n/\\\\n/' $target + $fix_newlines && sed -i 's/\\n/\\\\n/' $target }& done -- 2.46.2