-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed links in ERCS markdown files #42
Fixed links in ERCS markdown files #42
Conversation
Thx for doing this @cfries! |
…eum.org/EIPS/eip-712)
…ips.ethereum.org/EIPS/eip-712$3)`
…ips.ethereum.org/EIPS/eip-155$3)`
…` by `(erc-$2$3$4)`
…s.ethereum.org/EIPS/eip-712$3)` Where 712 is replaced by the following numbers: 86, 101, 170, 658, 1014, 1102, 1153, 1193, 1559, 2255, 2938, 3074, 3085, 3220, 3855, 5069, 5757
@lightclient - I managed to compile a few regexp fixing the links.
I manage to get the broken links down from 1800 to 27. Would it make sense to merge this one now? I could try to fix the others if time permits. It would maybe make sense to merge this one first and let the owners of the PRs merge the fixes. (the regexp could be more fancy, but I wanted to go slowly step by step). |
Thanks for this @cfries. In general this makes sense, unfortunately it overlooks the issue of building the This PR will cause all the relative ERC links to fail. |
Thanks for this link. I did not know that. However, if I understand this correctly all relative ERC links will work if they are done via (erc-xxxx.md) or via (./erc-xxxx.md), but they will fail if they are done via (../ERCS/erc-xxxx.md) (which some markdown files do, but many don't do). I could modify the regexp - recreating a new PR to standardize the links to be of (./erc-xxxx.md or to refrence ../assets/erc-xxxx. If I unserstand this correctly merging the web pages will then work. The remaining issues are links from ERC to EIP - these could work realatively after merge but let the validator fail. Two options here:
It this correct? If you like I could recreate this PR with modified regexps to at least fix all ERC links in the way above - if this is useful for you. |
@lightclient How about the following idea:
Alternatively one could modify the HTMLProofer script to replace links with external ones before doing the proofing, but this solution is a bit strange, because the local markdowns will not render correctly (it has broken links). This makes it harder to check ones markdown before submitting the PR. Maybe you can discuss this in the meeting and if you like, I could compile the set of useful regexps. |
@eth-bot rerun |
Also, please resolve the merge conflicts |
🛑 |
Done. Should I try to fix the remaining broken links in other ERCs too? (Not sure if I have enough time for this today). |
The commit 4d091eb (as a parent of 9c5db08) contains errors. |
There has been no activity on this pull request for 2 weeks. It will be closed after 3 months of inactivity. If you would like to move this PR forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
This pull request was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment. |
The HTML Proofer currently fails because all .md files in ERC reference eip-nnnn.md file but these files have been renamed to erc-nnnn.md. This PR just renames the links in the ERCS md files.
Please check if you find this PR reasonable:
\(eip-(\d\d+)\.md\)
by(erc-$1.md)
\(\./eip-(\d\d+)\.md\)
by(./erc-$1.md)
\.\./assets/eip-(\d\d+)\/
by../assets/erc-$1/
\: \./eip-(\d\d+)\.md
by: ./erc-$1.md
\((\./|\.\./EIPS/)eip-(\d\d+)(\.md|)((#[\w\-]*|))\)
by(erc-$2$3$4)
\./eip-(\d\d+)\.md
by./erc-$1.md
Note: The HTML Proofer will still fail because there are links to EIPs that are no longer in this repository (cross-linking is required). The above will also rename the EIPs to ERCs that are EIPs. Those likely require cross linking as there are no files in the ERCS folder. For those one could consider using abolute links:
\(\./(eip|erc)-155(\.md|)(#.*|)\)
by(https\://eips.ethereum.org/EIPS/eip-155$3)
\(\./(eip|erc)-712(\.md|)(#.*|)\)
by(https\://eips.ethereum.org/EIPS/eip-712$3)
(I am using this PR to find our if there is a set of reg exp that will fix all or most of the broken links - I hope you don't mind)
The above regexps reduce the number of errors reported by the HTMLProofer from
to
(There is maybe a one regexp for all - the list above is a result from step by step carefully fixing issues)