References in text are now converted into hyperlinks
References are bracketed---they are converted into superscripts. If text immediately preceeding the reference is bracketed, it is also hyperlinked.master
parent
6916c2bfc8
commit
0ea280a430
8
msgfmt
8
msgfmt
|
@ -34,8 +34,14 @@ awk '/^diff --git/ { exit } { print }' \
|
|||
# happen
|
||||
s#[fh]ttps\?://[^]\n )]\+#<a href="&">&</a>#g;
|
||||
|
||||
# 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
|
||||
s|\[\([0-9]\+\)\]|<sup><a href="#ref-\1">&</a></sup>|g
|
||||
|
||||
# paragraphs
|
||||
s#\n\[[0-9]\+\]#</p><p>&#g;
|
||||
s#\n\n#</p>&<p>#g;
|
||||
|
||||
# basic formatting
|
||||
|
|
Loading…
Reference in New Issue