Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
camelCase
  • Loading branch information
rubys committed Jul 20, 2018
commit 930d192e0e5cbfd6ec1146850932712e2327ab4b
8 changes: 4 additions & 4 deletions tools/doc/allhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ fs.writeFileSync(source + '/all.html', all, 'utf8');

// Validate all hrefs have a target.
const ids = new Set();
const id_re = / id="(\w+)"/g;
const idRe = / id="(\w+)"/g;
let match;
while (match = id_re.exec(all)) {
while (match = idRe.exec(all)) {
ids.add(match[1]);
}

const href_re = / href="#(\w+)"/g;
while (match = href_re.exec(all)) {
const hrefRe = / href="#(\w+)"/g;
while (match = hrefRe.exec(all)) {
if (!ids.has(match[1])) throw new Error(`link not found: ${match[1]}`);

This comment was marked as resolved.

Copy link
Copy Markdown
Member Author

@rubys rubys Jul 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think efficiency is a concern here... it will only be retrieved twice at most one time per run, and only if an error is thrown.

}