1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-12 17:26:17 +00:00

- add data-line attribute to definition lists and lists

- add tests
This commit is contained in:
Baptiste Augrain
2018-09-17 22:46:20 +02:00
parent 15b9f8e13f
commit 76928e43a3
6 changed files with 156 additions and 20 deletions

View File

@@ -251,9 +251,12 @@ class Markdown {
this.md.renderer.render = (tokens, options, env) => {
tokens.forEach((token) => {
switch (token.type) {
case 'heading_open':
case 'paragraph_open':
case 'blockquote_open':
case 'dd_open':
case 'dt_open':
case 'heading_open':
case 'list_item_open':
case 'paragraph_open':
case 'table_open':
token.attrPush(['data-line', token.map[0]])
}