Skip to content

tools: produce JSON documentation using unified/remark/rehype

Rodrigo Muino Tomonari requested to merge github/fork/rubys/remark-json into master

work in progress. tools/doc/json2.js is a first pass attempt to convert tools/doc/json.js to a new markdown toolchain. The original intent was to produce functionally identical JSON, but some oddities have been found along the way. Examples: (highest priority first):

  • No events have parms in JSON with the original code. The new code picks up the parms.
  • The JSON produced for fs as a number with a method signature from the next heading.
  • Various textRaw and default properties seemingly randomly have an extra trailing space in their values.

The current (soon to be previous?) processing is based on a stream of tokens and a state machine. The new process is based on a pipeline of processors that have access to a tree of tokens. Care has been taken to not modify the stream so that this processor can be added to the pipeline that produces HTML.

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

Merge request reports

Loading