1
0
Fork 0

chore: Added docs for jargon

This commit is contained in:
Joost De Cock 2019-10-12 16:12:33 +02:00
parent bc46cc9f1b
commit 07b659ef8f
10 changed files with 302 additions and 22 deletions

View file

@ -22,6 +22,7 @@ export default options => {
let html = options.jargon[term.toLowerCase()]
let value = `<span class="jargon-term">${term}<span class="jargon-info">${html}</span></span>`
let position = node.children[0].position
console.log('is jargon', { term, html, value, position })
position.end.column = position.end.column + value.length - term.lenght
position.end.offset = position.end.column - 1
node.children = [
@ -32,7 +33,7 @@ export default options => {
indent: node.children[0].indent
}
]
}
} else console.log('-', node)
}
const transform = tree => {