diff --git a/module/apps/coc7-parser.js b/module/apps/coc7-parser.js index 2f4e3f8d..0fd06a4f 100644 --- a/module/apps/coc7-parser.js +++ b/module/apps/coc7-parser.js @@ -9,7 +9,7 @@ export class CoC7Parser { let text = [] text = TextEditor._getTextNodes(html) - const rgx = new RegExp('@(coc7)\\.' + '([^\\]]+?)' + '\\[((?:[^\\]\\[]+|\\[(?:[^\\]\\[]+|\\[[^\\]\\[]*\\])*\\])*)\\]' + '(?:{([^}]+)})?', 'gi') + const rgx = new RegExp('@(coc7)\\.' + '(check|effect|item|sanloss)' + '\\[([^\\[\\]]*(?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\])*[^\\[\\]]*\\])*[^\\[\\]]*)\\]' + '(?:{([^}]+)})?', 'gi') TextEditor._replaceTextContent(text, rgx, CoC7Link._createLink) return html.innerHTML }