1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop,Mobile: Resolves #9594: Fix table-of-contents links to headings with duplicate content (#9610)

This commit is contained in:
Henry Heino 2024-01-04 07:14:52 -08:00 committed by GitHub
parent 7e8c87e908
commit 430f73c47a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,3 @@
<nav class="table-of-contents"><ul><li><a href="#test">test</a></li><li><a href="#test-2">test</a></li><li><a href="#test2">test2</a></li></ul></nav><h1 id="test">test</h1>
<h1 id="test-2">test</h1>
<h1 id="test2">test2</h1>

View File

@ -0,0 +1,5 @@
[toc]
# test
# test
# test2

View File

@ -88,7 +88,7 @@ const plugins: RendererPlugins = {
emoji: { module: require('markdown-it-emoji') },
insert: { module: require('markdown-it-ins') },
multitable: { module: require('markdown-it-multimd-table'), options: { multiline: true, rowspan: true, headerless: true } },
toc: { module: require('markdown-it-toc-done-right'), options: { listType: 'ul', slugify: slugify } },
toc: { module: require('markdown-it-toc-done-right'), options: { listType: 'ul', slugify: slugify, uniqueSlugStartIndex: 2 } },
expand_tabs: { module: require('markdown-it-expand-tabs'), options: { tabWidth: 4 } },
};
const defaultNoteStyle = require('./defaultNoteStyle');