check if node only contains text nodes
This commit is contained in:
parent
fee235b751
commit
4d6233b4bc
1 changed files with 1 additions and 0 deletions
|
@ -17,6 +17,7 @@ export default (options) => {
|
|||
const isJargon = (node) => {
|
||||
if (
|
||||
node.tagName === 'em' &&
|
||||
node.children.every((n) => n.type === 'text') &&
|
||||
Object.keys(options.jargon).indexOf(node.children[0].value.toLowerCase()) !== -1
|
||||
)
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue