docs: Fix broken fg(1) links#11504
Conversation
|
|
67ac3e6 to
679dc58
Compare
tools/doc/html.js
Outdated
There was a problem hiding this comment.
we need both the original and new match for this to return http://man7.org/linux/man-pages/man1/fg.1p.html
currently it will return /man-pages/man1p/ by the looks of it.
There was a problem hiding this comment.
@Fishrock123 Yup, I just noticed that. Fixing it.
There was a problem hiding this comment.
@Fishrock123 Fixed this. Do you think there should be a test for this?
|
@Fishrock123 Haven't found any concrete documentation around it but this is what I found in the changelog. (Ref: http://man7.org/linux/man-pages/changelog.html#release_2.50) |
The fg(1) links in the readline docs have moved from `http://man7.org/linux/man-pages/man1/fg.1.html` to `http://man7.org/linux/man-pages/man1/fg.1p.html`. It also modifies the regex for replacing man page links in docs by allowing optional character after number. eg: fg(1) and fg(1p) will both be now parsed and replaced. Fixes: nodejs#11492
679dc58 to
c0429d1
Compare
addaleax
left a comment
There was a problem hiding this comment.
If you want, you can turn the function into an arrow function and the string concatenations into template strings, that would make the code a bit easier to read here.
This LGTM with or without that :)
|
@addaleax The only reason I did not feel like changing it to fat arrow and template strings was because the code around it was still in the old syntax. Do you think I should still go ahead with it? I don't mind making that change. |
|
@karanjthakkar We don’t really do bulk updates of code because that interferes with things like backporting and |
|
@addaleax Done :) |
|
This change looks okay, but I found three more things in http://man7.org/linux/man-pages/dir_all_alphabetic.html, which will not be matched by this. |
|
@thefourtheye thats interesting! But I couldn't seem to find any instances of man page references for those suffixes/commands being used inside the docs. If y'all think this PR should include that as well, then I can rework the regex to include that. |
|
@addaleax I've fixed the test for the json doctool. The CI build should pass now. |
I think that would be a good idea, yes. (By the way, I read |
|
Landed in 6ae159f, resolved a minor conflict (neighbouring lines) while landing. Thanks for the PR! 🎉 |
The fg(1) links in the readline docs have moved from `http://man7.org/linux/man-pages/man1/fg.1.html` to `http://man7.org/linux/man-pages/man1/fg.1p.html`. It also modifies the regex for replacing man page links in docs by allowing optional character after number. eg: fg(1) and fg(1p) will both be now parsed and replaced. Fixes: #11492 PR-URL: #11504 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
The fg(1) links in the readline docs have moved from `http://man7.org/linux/man-pages/man1/fg.1.html` to `http://man7.org/linux/man-pages/man1/fg.1p.html`. It also modifies the regex for replacing man page links in docs by allowing optional character after number. eg: fg(1) and fg(1p) will both be now parsed and replaced. Fixes: #11492 PR-URL: #11504 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
|
This will need a backport PR if it needs to land in v6 or v4 |
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
doc