tools: update JSON header parsing for backticks
Methods, events, and so on in headers in our documentation may (and should) be set off with backticks in the raw markdown. When that happens, the headers is misinterpreted by tools/json.js as not being a method or event. Update the JSON tool generator to accommodate backticks in this situation and add a test for this situation.
Fixes: https://github.com/nodejs/node/issues/31290
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines