From 59910b3a864e7066e55020f010d795cc550e34d2 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jul 25 2011 00:22:29 +0000 Subject: Update `texinfo_makeSeeAlso.sh': - Be sure that no expansion be done when the closing tag of translation marker isn't specified. This trick was taken from `/usr/share/doc/sed-4.1.5/sedfaq.txt.gz'. --- diff --git a/Scripts/Functions/Help/Texinfo/texinfo_makeSeeAlso.sh b/Scripts/Functions/Help/Texinfo/texinfo_makeSeeAlso.sh index de76e48..90e81bc 100755 --- a/Scripts/Functions/Help/Texinfo/texinfo_makeSeeAlso.sh +++ b/Scripts/Functions/Help/Texinfo/texinfo_makeSeeAlso.sh @@ -133,8 +133,10 @@ function texinfo_makeSeeAlso { LIST_DEF="@c -- <[${CLI_PROGRAM}(SeeAlso${LIST_PROP})\n@${LIST_TYPE}\n${LIST_ENTRIES}@end ${LIST_TYPE}\n@c -- ]>" # Expand list definition using translation marker and list - # definition itself. - sed -r -i "/${LIST_TYPE_PATTERN}/,/^@c -- \]>$/c\\${LIST_DEF}" $MANUAL_ENTRY + # definition itself. Be sure that no expansion be done when + # the closing tag of translation marker isn't specified. + # Otherwise, there might be lost of content. + sed -r -i "/${LIST_TYPE_PATTERN}/{:a;N;/\n@c -- ]>$/!ba;s/.*/${LIST_DEF}/;}" $MANUAL_ENTRY # Clean up both list definition and list entries. Otherwise # undesired concatenations happen.