doc: Fix pxref translation issue.
authorJulien Lepiller <julien@lepiller.eu>
Sun, 18 Apr 2021 02:51:49 +0000 (04:51 +0200)
committerJulien Lepiller <julien@lepiller.eu>
Sun, 18 Apr 2021 11:17:09 +0000 (13:17 +0200)
* doc/local.mk (xref_command): Change regexp to match properly.

doc/local.mk

index 97122c7..53f41f1 100644 (file)
@@ -100,7 +100,7 @@ cat "$@.tmp" | egrep '@p?x?ref' -A1 | sed 'N;s|--\n||g;P;D' | sed 's|^| |g' | \
       line=$$(grep -n "^msgid \"$$e\"" "$<" | cut -f1 --delimiter=":") ;\
       ((line++)) ;\
       if [ "$$line" != "1" ]; then \
-       translation=$$(head -n "$$line" "$<" | tail -1 | grep msgstr | sed 's|msgstr "\(.*\)"|\1|') ;\
+       translation=$$(head -n "$$line" "$<" | tail -1 | grep msgstr | sed 's|msgstr "\([^"]*\)"|\1|') ;\
        if [ "$$translation" != "" ]; then \
              sed "N;s@\(p\?x\?ref\){$$(echo $$e | sed 's| |[\\n ]|g')\(,\|}\)@\1{$$translation\2@g;P;D" -i "$@.tmp" ;\
        fi ;\