Uh oh!
There was an error while loading. Please reload this page.
doc: link to man pages - #5073
Conversation
dcposch
commented
Feb 4, 2016
dcposch
commented
Feb 4, 2016
Links to e.g. http://man7.org/linux/man-pages/man2/chmod.2.html |
There was a problem hiding this comment.
Only one digit inside the parenthesis? There could be more than one. Also, use \d
There was a problem hiding this comment.
I think man pages only go 1-8 actually
http://unix.stackexchange.com/questions/3586/what-do-the-numbers-in-a-man-page-mean
Changed it to use \d
dcposch
commented
Feb 4, 2016
There was a problem hiding this comment.
Instead of matching again in getManLink, grouping can be done here itself, right?
There was a problem hiding this comment.
Also what if there is more than one reference?
There was a problem hiding this comment.
yeah good call, i changed it to /g
i did the grouping there to make it clear that name and number are safe to concat into an HTML string, but i'll just combine the two methods to keep things simple
evanlucas
commented
Feb 4, 2016
/cc @nodejs/documentation |
7bc5a9d to
445a1e4Compareestliberitas
commented
Feb 4, 2016
Would also be good to handle cases when POSIX call is wrapped in backquotes. For, example in #5075 I did this with a |
There was a problem hiding this comment.
Suggestion: Now that we have Sets in core, we may be able to speed up this lookup.
There was a problem hiding this comment.
Yeah, I would think that utilizing a Set or even an object would be faster here (assuming we get more items added to here as well.
varBSD_ONLY_SYSCALLS=newSet(['lchmod']);
...
if(BSD_ONLY_SYSCALLS.has(name)({
...
}else{
...
}Fishrock123
commented
Feb 4, 2016
I think every link should also have a [?] ( |
There was a problem hiding this comment.
cc @bnoordhuis what so you think about these sources for generic man docs?
There was a problem hiding this comment.
I was curious about that as well. I went through some digging on Man pages, so that particular set of docs is linked to from kernel.org as well. There's a bunch more sources for the Linux docs but I can't really find any official source. die.net for example.
There was a problem hiding this comment.
freebsd.org and man7.org are the official man pages so +1 from me. For freebsd.org, consider linking to the https:// site.
dcposch
commented
Feb 4, 2016
@Fishrock123 dunno, some parts of the docs, like here, have a lot of man page links. I think it would look distracting for each of those to have a superscript. |
Fishrock123
commented
Feb 5, 2016
Hmmm, then we should probably add a thing to "about these docs" at the very least. |
There was a problem hiding this comment.
Would the regex match if the markdown had a code snippet with, say, foo(1) in it?
There was a problem hiding this comment.
There was a problem hiding this comment.
NVM. Here's a place where it fails
doc/api/modules.markdown:var mySquare = square(2);
I'll change it to require special markup to generate the link, so we don't get false positives.
There was a problem hiding this comment.
@bnoordhuis actually it might be fine!
I just generated the docs and it seems that JS passes through the HTML syntax highlighter before it gets to linkManPages. The square(2) above doesn't turn into a link.
dcposch
commented
Feb 6, 2016
@Fishrock123 done |
There was a problem hiding this comment.
Can you wrap lines at 80 columns in this file?
bnoordhuis
commented
Feb 6, 2016
LGTM with style nits. |
jasnell
commented
Feb 7, 2016
LGTM with @bnoordhuis' nits addressed |
dcposch
commented
Feb 8, 2016
@bnoordhuis@jasnell fixed LMK if you want me to squash this PR to a single commit |
DavidTPate
commented
Feb 8, 2016
LGTM |
There was a problem hiding this comment.
@estliberitas Hope you are taking care of this page as well :)
There was a problem hiding this comment.
@thefourtheye Hi, I'm a bit out of context. I'll do the usual stuff I do for API pages. Also, once I structure what's on my mind, I'll add maybe a section to this page on how things should be formatted, etc. If it's not added yet, hah.
Sounds OK? Or I do not get what should be done, coz the only thing to be added here would be something like a cool guide on formatting the stuff. But I'm not sure if this page is appropriate for this.
There was a problem hiding this comment.
Ah my bad. I just saw few linkable text on this page and reached out for your help. Perhaps we can leave this page as nothing much is needed here.
There was a problem hiding this comment.
Anyways, I'll continue my crusade on docs today and tomorrow. :)
On Sat, Feb 13, 2016, 08:59 thefourtheye notifications@github.com wrote:
In doc/api/documentation.markdown
#5073 (comment):@@ -66,3 +66,19 @@ Every HTML file in the markdown has a corresponding JSON file with the
same data.Ah my bad. I just saw few linkable text on this page and reached out for
your help. Perhaps we can leave this page as nothing much is needed here.—
Reply to this email directly or view it on GitHub
https://github.com/nodejs/node/pull/5073/files#r52824032.Sincerely,
Alexander Makarenko
thefourtheye
commented
Feb 8, 2016
LGTM |
silverwind
commented
Feb 9, 2016
@dcposch please rebase you branch. |
a0viedo
commented
Feb 9, 2016
@dcposch if you could use a hand squashing your commits into one, please let me know |
dcposch
commented
Feb 10, 2016
@a0viedo@silverwind done |
silverwind
commented
Feb 10, 2016
Regarding the section |
There was a problem hiding this comment.
Tiny nit: we write Mac OS X (space before X) almost everywhere else.
bnoordhuis
commented
Feb 11, 2016
Changes LGTM sans nit. If other collaborators agree, please land it. |
This changes the doc generator to automatically link references such as `open(2)` to a man page on man7.org or freebsd.org
dcposch
commented
Feb 11, 2016
@silverwind dunno, syscalls are used elsewhere to (not just in |
jasnell
commented
Feb 15, 2016
Still LGTM |
silverwind
commented
Feb 17, 2016
@dcposch hmm, alright then. LGTM. |
| '&sektion=' + number + '">' + displayAs + '</a>'; | ||
| } else { | ||
| return ' <a href="http://man7.org/linux/man-pages/man' + number + | ||
| '/' + name + '.' + number + '.html">' + displayAs + '</a>'; |
silverwind
commented
Feb 27, 2016
Thanks! Landed in 4e77a7c. |
This changes the doc generator to automatically link references such as `open(2)` to a man page on man7.org or freebsd.org PR-URL: #5073 Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
This changes the doc generator to automatically link references such as `open(2)` to a man page on man7.org or freebsd.org PR-URL: #5073 Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
This changes the doc generator to automatically link references such as `open(2)` to a man page on man7.org or freebsd.org PR-URL: #5073 Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
This changes the doc generator to automatically link references such as `open(2)` to a man page on man7.org or freebsd.org PR-URL: #5073 Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
This changes the doc generator to automatically link references such as `open(2)` to a man page on man7.org or freebsd.org PR-URL: #5073 Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>


This changes the doc generator to automatically link references such as
open(2)to a man page on man7.org or freebsd.orgFixes#4375