Skip to content

Fix error and waring in make doc

Rodrigo Muino Tomonari requested to merge github/fork/shigeki/fix_make_doc into master

#4370 causes an error of checking the depth of heading level in buffer api doc during make doc as

/home/ohtsu/github/node/tools/doc/generate.js:52
        if (er) throw er;
                ^

Error: Inappropriate heading level
{"type":"heading","depth":3,"text":"Buffers and Character Encodings"}
    at /home/ohtsu/github/node/tools/doc/html.js:192:17
    at Array.forEach (native)
    at buildToc (/home/ohtsu/github/node/tools/doc/html.js:189:9)
    at render (/home/ohtsu/github/node/tools/doc/html.js:71:3)
    at /home/ohtsu/github/node/tools/doc/html.js:37:7
    at tryToString (fs.js:414:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12)
make: *** [out/doc/api/all.html] Error 1

This just changes error headings of the sections to the 2nd level.

And I also found that warning was shown from json.js as

Warning: invalid param "end]"
 > {"textRaw":"`end` Number, Optional, Default: `buffer.length` ","name":"end","desc":"Number, Optional, Default: `buffer.length`"}
 > buf.slice([start[, end]])

This is due to insufficient trimming of right square brackets and it is fixed.

R= @jasnell

Merge request reports

Loading