Add links to line numbers#7
Conversation
that was partly done using the following commands sed -i 's/title=\(.*\)(\([0-9][0-9][0-9][0-9]\))/title=\1(_\2_)/' *.html needs to run that a few times to avoid breaking the next/previous links in commentary to link line numbers in sections "lines XXXX to YYYY" sed -i 's/lines \([0-9][0-9][0-9][0-9]\) to \([0-9][0-9][0-9][0-9]\)/lines <a target="code" href="..\/all.html#line\1">\1<\/a> to <a target="code" href="..\/all.html#line\2">\2<\/a>/g' *.html to link line numbers in sections "lines XXXX, YYYY and ZZZZ" sed -i 's/lines \([0-9][0-9][0-9][0-9]\), \([0-9][0-9][0-9][0-9]\) and \([0-9][0-9][0-9][0-9]\)/lines <a target="code" href="..\/all.html#line\1">\1<\/a>, <a target="code" href="..\/all.html#line\2">\2<\/a> and <a target="code" href="..\/all.html#line\3">\3<\/a>/g' *.html to link line numbers in sections "lines XXXX and YYYY" sed -i 's/lines \([0-9][0-9][0-9][0-9]\) and \([0-9][0-9][0-9][0-9]\)/lines <a target="code" href="..\/all.html#line\1">\1<\/a> and <a target="code" href="..\/all.html#line\2">\2<\/a>/g' *.html to link line numbers in sections "lines XXXX, YYYY" sed -i 's/lines \([0-9][0-9][0-9][0-9]\), \([0-9][0-9][0-9][0-9]\)/lines <a target="code" href="..\/all.html#line\1">\1<\/a>, <a target="code" href="..\/all.html#line\2">\2<\/a>/g' *.html to link line numbers in sections "line XXXX" sed -i 's/line \([0-9][0-9][0-9][0-9]\)/line <a target="code" href="..\/all.html#line\1">\1<\/a>/g' *.html to link line numbers in sections "Line XXXX" sed -i 's/Line \([0-9][0-9][0-9][0-9]\)/Line <a target="code" href="..\/all.html#line\1">\1<\/a>/g' *.html to link line numbers in sections "(XXXX)" sed -i 's/(\([0-9][0-9][0-9][0-9]\))/(<a target="code" href="..\/all.html#line\1">\1<\/a>)/g' *.html to link line numbers in sections "(XXXX,YYYY)" sed -i 's/(\([0-9][0-9][0-9][0-9]\),\([0-9][0-9][0-9][0-9]\))/(<a target="code" href="..\/all.html#line\1">\1<\/a>,<a target="code" href="..\/all.html#line\2">\2<\/a>)/g' *.html to link line numbers in sections "(XXXX, YYYY)" sed -i 's/(\([0-9][0-9][0-9][0-9]\), \([0-9][0-9][0-9][0-9]\))/(<a target="code" href="..\/all.html#line\1">\1<\/a>, <a target="code" href="..\/all.html#line\2">\2<\/a>)/g' *.html sed -i 's/_\([0-9][0-9][0-9][0-9]\)_/\1/g' *.html to remove what the first line did a few manual edits following all that have also been necessary
|
Hi, thanks for the pull request! If you want to can you add the additional sed scripts to lions step in the Makefile? I'd lake to seperate the iframes change. At the moment I'd miss the possbility to resize/move the divider. The Github action rebuilds the whole project and publishes the artifacts (html file), which will then be served. I might change my mind about all of this. |
|
@warsus well I wasn't so sure about how the html was generated, so I'll try to integrate these in the Makefile. I understand about the iframe, I didn't know you were planning to modernize the whole stuff, which is good news ! |
As requested by #2, this is an attempt at adding the links from the commentary (now i)frame to the source (now i)frame.
Most of the work has been done using sed, but some late fixes have been done manually.
The result can be seen at https://daftaupe.github.io/lions-/
I tried my best to check the whole document visually, but it's rather long and there can stil be a few links missing here and there.
In addition there are 2 small fixes not really related but I can remove them if you prefer to have them separately.