Update dependency markdown-it-anchor to v6 (#642)

* Update dependency markdown-it-anchor to v6
* Set initial slug-count offset on duplicate headings to 1 instead of 2

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
renovate[bot] 2020-11-26 22:05:17 +01:00 committed by GitHub
parent d3309b3338
commit fda558d649
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -62,7 +62,7 @@
"luxon": "1.25.0", "luxon": "1.25.0",
"markdown-it": "12.0.2", "markdown-it": "12.0.2",
"markdown-it-abbr": "1.0.4", "markdown-it-abbr": "1.0.4",
"markdown-it-anchor": "5.3.0", "markdown-it-anchor": "6.0.1",
"markdown-it-container": "3.0.0", "markdown-it-container": "3.0.0",
"markdown-it-deflist": "2.1.0", "markdown-it-deflist": "2.1.0",
"markdown-it-emoji": "2.0.0", "markdown-it-emoji": "2.0.0",

View file

@ -26,8 +26,8 @@ const convertLevel = (toc: TocAst, levelsToShowUnderThis: number, headerCounts:
} }
const rawName = toc.n.trim() const rawName = toc.n.trim()
const nameCount = (headerCounts.get(rawName) ?? 0) + 1 const nameCount = (headerCounts.get(rawName) ?? -1) + 1
const slug = `#${slugify(rawName)}${nameCount > 1 ? `-${nameCount}` : ''}` const slug = `#${slugify(rawName)}${nameCount > 0 ? `-${nameCount}` : ''}`
headerCounts.set(rawName, nameCount) headerCounts.set(rawName, nameCount)

View file

@ -9437,10 +9437,10 @@ markdown-it-abbr@1.0.4:
resolved "https://registry.yarnpkg.com/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz#d66b5364521cbb3dd8aa59dadfba2fb6865c8fd8" resolved "https://registry.yarnpkg.com/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz#d66b5364521cbb3dd8aa59dadfba2fb6865c8fd8"
integrity sha1-1mtTZFIcuz3Yqlna37ovtoZcj9g= integrity sha1-1mtTZFIcuz3Yqlna37ovtoZcj9g=
markdown-it-anchor@5.3.0: markdown-it-anchor@6.0.1:
version "5.3.0" version "6.0.1"
resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz#d549acd64856a8ecd1bea58365ef385effbac744" resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-6.0.1.tgz#f54b78757d0b61455faf8ced775b39498bd6d6f9"
integrity sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA== integrity sha512-8qX4r5R6AtXla9HKCouEQ40inw69O5jR4VUXlZySsBLxIXlsJ3Yi9JV6JWPU4ZdA8jWTGDDJjJYNLwQ0W4jCag==
markdown-it-container@3.0.0: markdown-it-container@3.0.0:
version "3.0.0" version "3.0.0"