stakx / ecma-335

Markdown version of ECMA-335: Common Language Infrastructure (CLI). Work in progress (approx. 99% complete). Collaboration welcome!
39 stars 4 forks source link

Script changes to fix more TODO links #15

Closed darthwalsh closed 2 years ago

darthwalsh commented 2 years ago

I've been making many changes to the metadata sections, so I wanted to fix a few category of TODO missing links. Result: All TODO links to pattern /I.2/ are fixed!

Seen incremental commits in the PR for any scripted change, and the explanations, but here's a summary:

Fix links to (#todo-missing-hyperlink)

Several of the TODO link targets have double (( which breaks the add-hyperlinks script.

In the docs folder ran the command:

sed -i '' -e 's/]((#todo-missing-hyperlink))/](#todo-missing-hyperlink)/g' *.md

Ran add-hyperlinks-to-numbered-sections.js

Add-Hyperlinks script should only link to MD

Many of the TODO hyperlinks fail matching because a PNG path also matches. Filter to MD then rerun the script.

Add-Hyperlinks with more specific regex with the "section"(?) symbol

Several of the regex matches were wrong, like

[Note: blah blah  See §[I.8.2.3](#todo-

So the find-replace was using the first [ instead of the second [ after the section symbol §. Change the regex to hardcode the start §[ which fixes many more links.

ALSO, manually fixed ii.22.26-methoddef-0x06.md which had the plural hyperlinks which didn't match the regex

stakx commented 2 years ago

Wow, this is great. 😍 Thank you very much for making these corrections, and for filling in so many missing hyperlinks!

stakx commented 2 years ago

This PR addressed #8 partially... just saying so a mention of this PR appears over in the issue. ;-)