-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
doc: various documentation formatting fixes #7637
Conversation
Wanna squash addaleax/node@edb5c6a in here? LGTM either way. |
@addaleax Squashed, thanks! |
/cc @nodejs/documentation |
@nodejs/collaborators, will land this tomorrow if no objections. |
@@ -74,7 +74,7 @@ Most fs functions let you omit the callback argument. If you do, a default | |||
callback is used that rethrows errors. To get a trace to the original call | |||
site, set the `NODE_DEBUG` environment variable: | |||
|
|||
``` | |||
```txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does sh
not work on these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does highlight something, but not good.
Example:
$ cat script.js
function bad() {
require('fs').readFile('/');
}
bad();
$ env NODE_DEBUG=fs node script.js
fs.js:88
throw backtrace;
^
Error: EISDIR: illegal operation on a directory, read
<stack trace.>
It's not a shell script, it's two shell commands + their output, and formatting the output as if it was a part of a shell script isn't a good idea imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console
might work:
$ cat script.js
function bad() {
require('fs').readFile('/');
}
bad();
$ env NODE_DEBUG=fs node script.js
fs.js:88
throw backtrace;
^
Error: EISDIR: illegal operation on a directory, read
<stack trace.>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, nice. Will check if our doc tooling supports it and will file a pull request to fix that if it is.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yeah, that sucks. Guess we should leave it at text
until something better turns up :)
LGTM with question |
* Fix markdown code sample in releases.md, it was <a id="x.y.x></a>" * Fix some markdown errors, e.g. in changelogs * Fix broken defs links, e.g. in domain-postmortem.md * Fix other broken refs, by addaleax * Add links to some defs that were present but not linked to * Remove dead defs * Move defs to the bottom (one file affected) * Add language indicators to all code blocks, using `txt` when no specific language could be chosen * Some minor formatting changes (spaces, ident, headings) PR-URL: nodejs#7637 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Roman Reiss <me@silverwind.io>
Merged in a58b48b. |
This isn't landing cleanly on v6.x. Mind backporting? |
@evanlucas, will do. Perhaps after #7727 lands. |
Continuing what a58b48b did for the doc/ dir, this fixes some formatting issues in the *.md files that are placed directly in the top-level directory. README.md changes are excluded as they are covered by nodejs#7971 Refs: nodejs#7637 PR-URL: nodejs#7727 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Specifies the configuration for remark-lint, a markdown linter. This configuration does not cause any warnings on any of the currently present *.md files (ignoring thirdparty). It is useful not only for possible future tooling that would check the markdown files syntax, but also as a configuration for editor plugins, e.g. linter-markdown for atom-linter. Refs: nodejs#7637 Refs: nodejs#7727 Refs: nodejs#7757 PR-URL: nodejs#7729 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
* Fix markdown code sample in releases.md, it was <a id="x.y.x></a>" * Fix some markdown errors, e.g. in changelogs * Fix broken defs links, e.g. in domain-postmortem.md * Fix other broken refs, by addaleax * Add links to some defs that were present but not linked to * Remove dead defs * Move defs to the bottom (one file affected) * Add language indicators to all code blocks, using `txt` when no specific language could be chosen * Some minor formatting changes (spaces, ident, headings) PR-URL: #7637 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Roman Reiss <me@silverwind.io> Conflicts: doc/api/zlib.md doc/changelogs/CHANGELOG_V4.md
Continuing what a58b48b did for the doc/ dir, this fixes some formatting issues in the *.md files that are placed directly in the top-level directory. README.md changes are excluded as they are covered by #7971 Refs: #7637 PR-URL: #7727 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Specifies the configuration for remark-lint, a markdown linter. This configuration does not cause any warnings on any of the currently present *.md files (ignoring thirdparty). It is useful not only for possible future tooling that would check the markdown files syntax, but also as a configuration for editor plugins, e.g. linter-markdown for atom-linter. Refs: #7637 Refs: #7727 Refs: #7757 PR-URL: #7729 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Specifies the configuration for remark-lint, a markdown linter. This configuration does not cause any warnings on any of the currently present *.md files (ignoring thirdparty). It is useful not only for possible future tooling that would check the markdown files syntax, but also as a configuration for editor plugins, e.g. linter-markdown for atom-linter. Refs: #7637 Refs: #7727 Refs: #7757 PR-URL: #7729 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Specifies the configuration for remark-lint, a markdown linter. This configuration does not cause any warnings on any of the currently present *.md files (ignoring thirdparty). It is useful not only for possible future tooling that would check the markdown files syntax, but also as a configuration for editor plugins, e.g. linter-markdown for atom-linter. Refs: #7637 Refs: #7727 Refs: #7757 PR-URL: #7729 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
@ChALkeR setting don't land for v4.x let me know if you want to backport |
Specifies the configuration for remark-lint, a markdown linter. This configuration does not cause any warnings on any of the currently present *.md files (ignoring thirdparty). It is useful not only for possible future tooling that would check the markdown files syntax, but also as a configuration for editor plugins, e.g. linter-markdown for atom-linter. Refs: #7637 Refs: #7727 Refs: #7757 PR-URL: #7729 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Specifies the configuration for remark-lint, a markdown linter. This configuration does not cause any warnings on any of the currently present *.md files (ignoring thirdparty). It is useful not only for possible future tooling that would check the markdown files syntax, but also as a configuration for editor plugins, e.g. linter-markdown for atom-linter. Refs: #7637 Refs: #7727 Refs: #7757 PR-URL: #7729 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Checklist
Affected core subsystem(s)
doc
Description of change
<a id="x.y.x></a>"
txt
when nospecific language could be chosen