Commit graph

11 commits

Author SHA1 Message Date
Bartosz Kaszubowski
aa7430e168
feat(v1): add 'slugPreprocessor' config option to allow users customize the hash links (#3124)
* fix(v1): remove HTML content from hash links

* fix one more test

* rewrite changes as new feature to prevent breaking changes
2020-07-28 14:17:28 +02:00
Alexey Pyltsyn
1f00d15c74 chore(v2): fix code style (revert previous changes) 2020-04-05 17:38:12 +03:00
Alexey Pyltsyn
6965a668cd chore(v2): fix code style 2020-04-05 17:30:59 +03:00
Yangshun Tay
b07507c9cc
chore(v2): upgrade devDependencies (#2538)
* chore(v2): upgrade devDependencies

* chore(v2): upgrade devDependencies

* chore: prettier
2020-04-05 19:07:44 +08:00
Yangshun Tay
32c1a92b17
chore: yearless copyright headers for source code (#2320)
* chore: yearless copyright headers for source code

* update snapshots
2020-02-25 23:12:28 +08:00
Endi
bd68dce667
fix(v1): markdown content and toc should render the same (#2022)
* fix(v1): autogenerated_toc and sidebar toc should render the same

* revert test docs

* yarn.lock
2019-11-21 12:04:07 +07:00
Endi
e544dc960a
fix(v1): consistent slug & hash-link generation (#2019) 2019-11-20 23:35:47 +07:00
endiliey
ab1520548d chore: bump dependencies 2019-11-01 01:25:10 +07:00
Emelia Smith
250a818e7f feat(v1): strip html from TOC (#1762)
The approach here is to first strip the HTML from the heading's content, then rendered it with markdown to get the HTML content for the TOC entry, then to strip the HTML from the rendered content again, as to get the text for the TOC entry's link.

Adds an additional dependency of striptags (MIT licensed)

Example TOC Entry, given the heading of:

```markdown
```

```javascript
{
  hashLink: 'foo',
  rawContent: '<a name="foo"></a> _Foo_',
  content: '<em>Foo</em>',
  children: []
}
```

Previously this TOC entry would be:

```javascript
{
  hashLink: 'a-name-foo-a-_foo_',
  rawContent: '<a name="foo"></a> _Foo_',
  content: '&lt;a name=&quot;foo&quot;&gt;&lt;/a&gt; <em>Foo</em>',
  children: []
}
```

closes issue #1703
2019-09-13 14:57:22 -07:00
Endi
f84abfe2d1
fix: right TOC should not strip special chars (#1458)
* fix: right TOC should not strip special chars

* nits
2019-05-14 23:55:35 +07:00
Endilie Yacop Sucipto
1f91d19a8c
chore: move to monorepo (#1297)
* chore: move to monorepo

* lint all js file

* simplify circleCI

* fix failing tests

* fix tests due to folder rename

* fix test since v1 website is renamed
2019-03-23 14:21:36 +07:00
Renamed from v1/lib/core/toc.js (Browse further)