| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Links to e.g. http://man7.org/linux/man-pages/man2/chmod.2.html |
Sorry, something went wrong.
There was a problem hiding this comment.
Only one digit inside the parenthesis? There could be more than one. Also, use \d
Sorry, something went wrong.
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
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Instead of matching again in getManLink, grouping can be done here itself, right?
Sorry, something went wrong.
There was a problem hiding this comment.
Also what if there is more than one reference?
Sorry, something went wrong.
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
Sorry, something went wrong.
|
/cc @nodejs/documentation |
Sorry, something went wrong.
|
Would also be good to handle cases when POSIX call is wrapped in backquotes. For, example in #5075 I did this with a sed and your solution is much better. 😉 |
Sorry, something went wrong.
There was a problem hiding this comment.
Suggestion: Now that we have Sets in core, we may be able to speed up this lookup.
Sorry, something went wrong.
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.
var BSD_ONLY_SYSCALLS = new Set(['lchmod']);
...
if (BSD_ONLY_SYSCALLS.has(name)( {
...
} else {
...
}
Sorry, something went wrong.
There was a problem hiding this comment.
done
Sorry, something went wrong.
|
I think every link should also have a [?] (<sup>[?]</sup>) link pointing towards some sort of doc on what a man page is. I.e. how to do man N thing and what that means in terms of different operating systems. |
Sorry, something went wrong.
There was a problem hiding this comment.
cc @bnoordhuis what so you think about these sources for generic man docs?
Sorry, something went wrong.
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.
Sorry, something went wrong.
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.
Sorry, something went wrong.
There was a problem hiding this comment.
done
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
|
Hmmm, then we should probably add a thing to "about these docs" at the very least. |
Sorry, something went wrong.
There was a problem hiding this comment.
Would the regex match if the markdown had a code snippet with, say, foo(1) in it?
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
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.
Sorry, something went wrong.
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.
Sorry, something went wrong.
There was a problem hiding this comment.
Can you wrap lines at 80 columns in this file?
Sorry, something went wrong.
|
LGTM with style nits. |
Sorry, something went wrong.
|
@bnoordhuis @jasnell fixed LMK if you want me to squash this PR to a single commit |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
There was a problem hiding this comment.
@estliberitas Hope you are taking care of this page as well :)
Sorry, something went wrong.
There was a problem hiding this comment.
@thefourtheye Np, will do soon )
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks :)
Sorry, something went wrong.
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.
Sorry, something went wrong.
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.
Sorry, something went wrong.
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
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
@dcposch if you could use a hand squashing your commits into one, please let me know |
Sorry, something went wrong.
|
Regarding the section Syscalls and man pages: I'd suggest moving it near the top of the fs page. I'm not sure the place below the stability index is really the right one for it, it feels out of place there. |
Sorry, something went wrong.
There was a problem hiding this comment.
Tiny nit: we write Mac OS X (space before X) almost everywhere else.
Sorry, something went wrong.
There was a problem hiding this comment.
@bnoordhuis fixed
Sorry, something went wrong.
|
Changes LGTM sans nit. If other collaborators agree, please land it. |
Sorry, something went wrong.
This changes the doc generator to automatically link references such as `open(2)` to a man page on man7.org or freebsd.org
|
@silverwind dunno, syscalls are used elsewhere to (not just in fs) and @Fishrock123 wanted the explanation under About These Docs |
Sorry, something went wrong.
|
Still LGTM |
Sorry, something went wrong.
| '&sektion=' + number + '">' + displayAs + '</a>'; | ||
| } else { | ||
| return ' <a href="http://man7.org/linux/man-pages/man' + number + | ||
| '/' + name + '.' + number + '.html">' + displayAs + '</a>'; |
There was a problem hiding this comment.
template literal?
Sorry, something went wrong.
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>
| Back | FazBrowse Home | New Git URL |
This changes the doc generator to automatically link references such as
open(2) to a man page on man7.org or freebsd.org
Fixes #4375