Skip to content

[v10.x backport] doc: allow <code> in header elements

Backport of https://github.com/nodejs/node/pull/31086:

First commit:

doc: allow <code> in header elements

Allow use of <code> in header elements without styling side effects. We
can add styling later if desired. The goal here is to allow code to be
set off in markdown without needing to escape characters and do lint
exceptions for terms. This is probably a win in terms of accessibility
too although it would be moreso if we had some visual differentiation
for <code> inside of headers. As mentioned above, that can always be
added at a later time.

Second commit:

doc,dns: use code markup/markdown in headers

This will allow us to lint for use of `hostname` in prose without
flagging `hostname` in code within headers. This also allows us to
remove backslash escaping for `[` and `]` inside of header code, which
makes the bare markdown more readable.

Remaining commits from the PR omitted as these two are the most important ones and the remaining ones are quite tedious to work through.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading