Skip to content

Commit 9a0f2d0

Browse files
flakey5ovflowd
authored andcommitted
fixup tests
Signed-off-by: flakey5 <[email protected]>
1 parent f9740ab commit 9a0f2d0

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

Makefile

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,28 @@ out/doc/api/%.html out/doc/api/%.json: doc/api/%.md tools/doc/node_modules | out
840840
) \
841841

842842
out/doc/api/all.html: $(apidocs_html) | out/doc/api
843+
$(call available-node, \
844+
$(NPX) --prefix tools/doc doc-kit generate \
845+
-t legacy-html-all \
846+
-i doc/api/*.md \
847+
--ignore $(skip_apidoc_files) \
848+
-o $(@D) \
849+
-c ./CHANGELOG.md \
850+
-v $(VERSION) \
851+
--index doc/api/index.md \
852+
) \
843853

844854
out/doc/api/all.json: $(apidocs_json) | out/doc/api
855+
$(call available-node, \
856+
$(NPX) --prefix tools/doc doc-kit generate \
857+
-t legacy-json-all \
858+
-i doc/api/*.md \
859+
--ignore $(skip_apidoc_files) \
860+
-o $(@D) \
861+
-c ./CHANGELOG.md \
862+
-v $(VERSION) \
863+
--index doc/api/index.md \
864+
) \
845865

846866
.PHONY: docopen
847867
docopen: doc-only ## Open the documentation in a web browser.
@@ -1354,12 +1374,7 @@ tools/.mdlintstamp: tools/lint-md/node_modules/remark-parse/package.json $(LINT_
13541374
@touch $@
13551375

13561376
.PHONY: lint-md
1357-
lint-md: lint-js-doc lint-docs | tools/.mdlintstamp ## Lint the markdown documents maintained by us in the codebase.
1358-
1359-
.PHONY: lint-docs
1360-
lint-docs: tools/doc/node_modules
1361-
$(info Running API Doc linter...)
1362-
$(call available-node, $(NPX) --prefix tools/doc doc-kit lint -i doc/api/*.md)
1377+
lint-md: lint-js-doc | tools/.mdlintstamp ## Lint the markdown documents maintained by us in the codebase.
13631378

13641379
run-format-md = tools/lint-md/lint-md.mjs --format $(LINT_MD_FILES)
13651380
.PHONY: format-md

test/doctool/test-make-doc.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ for (const name of actualDocs) {
3434
}
3535

3636
const toc = fs.readFileSync(new URL('./index.html', apiURL), 'utf8');
37-
const re = /href="([^/]+\.html)"/;
37+
const re = /href=("([^/]+\.html)"|([^/]+\.html))/;
3838
const globalRe = new RegExp(re, 'g');
3939
const links = toc.match(globalRe);
4040
assert.notStrictEqual(links, null);

0 commit comments

Comments
 (0)