1
0
Fork 0

Enclosed text in reference hyperlinks must not begin with a non-numeric character

This is not the best of solutions, but will at least help to eliminate the problem of multiple adjacent references.
master
Mike Gerwitz 2013-03-15 16:26:05 -04:00
parent 91c85b1091
commit 8b6e57709d
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
1 changed files with 4 additions and 2 deletions

6
msgfmt
View File

@ -93,8 +93,10 @@ awk -vid="$id" -vurl_root="$url_root" -vcref_errlog="$cref_errlog" '
# reference definitions (footnotes)
s#\n\[\([0-9]\+\)\]#</p><p id="ref-\1">&#g;
# references in text
s|\[\([^]]\+\)\]\[\([0-9]\+\)\]|<a href="#ref-\2">\1</a>\[\2\]|g
# references in text (note that references that enclose text as a hyperlink
# must not start with a number, otherwise they will be considered to be a
# reference number)
s|\[\([^0-9][^]]\+\)\]\[\([0-9]\+\)\]|<a href="#ref-\2">\1</a>\[\2\]|g
s|\[\([0-9]\+\)\]|<sup><a href="#ref-\1">&</a></sup>|g
# paragraphs