Skip to content

Commit 5789af5

Browse files
committed
docs: fix table-of-contents generation (#3840)
1 parent 1e8e24c commit 5789af5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ page.removeListener('request', logRequest);
690690
```
691691

692692
<!-- GEN:toc -->
693-
- [event: '_videostarted'](#event-videostarted)
693+
- [event: '_videostarted'](#event-_videostarted)
694694
- [event: 'close'](#event-close-1)
695695
- [event: 'console'](#event-console)
696696
- [event: 'crash'](#event-crash)

docs/ci.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ configurations for common CI providers.
1515
* [Bitbucket Pipelines](#bitbucket-pipelines)
1616
* [GitLab CI](#gitlab-ci)
1717
- [Caching browsers](#caching-browsers)
18-
- [Exception: `node_modules` are cached](#exception-nodemodules-are-cached)
18+
- [Exception: `node_modules` are cached](#exception-node_modules-are-cached)
1919
- [Directories to cache](#directories-to-cache)
2020
- [Debugging browser launches](#debugging-browser-launches)
2121
- [Running headful](#running-headful)
@@ -102,7 +102,7 @@ Suggested configuration
102102
Chromium in non-headless mode (e.g. to test Chrome Extensions)
103103
1. If your project does not have `package-lock.json`, Travis would be auto-caching
104104
`node_modules` directory. If you run `npm install` (instead of `npm ci`), it is
105-
possible that the browser binaries are not downloaded. Fix this with [these steps](#exception-nodemodules-are-cached) outlined below.
105+
possible that the browser binaries are not downloaded. Fix this with [these steps](#exception-node_modules-are-cached) outlined below.
106106

107107
To sum up, your `.travis.yml` might look like this:
108108

utils/doclint/preprocessor/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function getTOCEntriesForText(text) {
9090
for (const {line, offset} of titles) {
9191
const [, nesting, name] = line.match(titleRegex);
9292
const delinkifiedName = name.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1');
93-
const id = delinkifiedName.trim().toLowerCase().replace(/\s/g, '-').replace(/[^-0-9a-zа-яё]/ig, '');
93+
const id = delinkifiedName.trim().toLowerCase().replace(/\s/g, '-').replace(/[^-_0-9a-zа-яё]/ig, '');
9494
let dedupId = id;
9595
let counter = 0;
9696
while (ids.has(dedupId))

0 commit comments

Comments
 (0)