src: build: Stop build_man.sh from deleting short Detailed Descriptions
PATCH 1/1 src: build: Stop build_man.sh from deleting short Detailed Descriptions
An empty Detailed Description is 3 lines long but a short (1-para) DD is also 3 lines. Check that the 3rd line really is empty.
Signed-off-by Duncan Roe <[email protected]>
--- doxygen/build_man.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
doxygen/build_man.sh +5 -1
@@ -116,7 +116,11 @@ del_empty_det_desc(){ mygrep "^\\.SH \"Detailed Description" $target [ $linnum -ne 0 ] || return 0 [ $(($i - $linnum)) -eq 3 ] || return 0 - delete_lines $linnum $(($i -1)) + # A 1-line Detailed Description is also 3 lines long, + # but the 3rd line is not empty + i=$(($i -1)) + [ $(tail -n+$i $target | head -n1 | wc -c) -le 2 ] || return 0 + delete_lines $linnum $i } move_synopsis(){
Signature · 1 line
2.17.5
Quoted 2 lines · Duncan Roe
An empty Detailed Description is 3 lines long but a short (1-para) DD is also 3 lines. Check that the 3rd line really is empty.
applied.