The regex for some things is getting complex. See
(\\s*[.'_\\-!#$%^&*+=?,:\\\\/\"\\w\\s]*)?(-?-[-\\>]\\|?|=?=[=\\>]|(?:\\.-|-\\.)-?\\>?|\\|)(\\s*[-\\w]+\\b)(\\[|\\(+|\\>|\\{)?(\\s*[-\\w]+\\b)?(\\]|\\)+|\\})?
Convert the codeblock.json to a yaml file to parse it. See this vs code page about converting it. After converting, move every capture group to separate lines to make it easier to follow.
Additionally, add a command to the npm package to run the converter (with a change to the bad codeblock.json file name).
The regex for some things is getting complex. See
(\\s*[.'_\\-!#$%^&*+=?,:\\\\/\"\\w\\s]*)?(-?-[-\\>]\\|?|=?=[=\\>]|(?:\\.-|-\\.)-?\\>?|\\|)(\\s*[-\\w]+\\b)(\\[|\\(+|\\>|\\{)?(\\s*[-\\w]+\\b)?(\\]|\\)+|\\})?
Convert the
codeblock.json
to a yaml file to parse it. See this vs code page about converting it. After converting, move every capture group to separate lines to make it easier to follow.Additionally, add a command to the npm package to run the converter (with a change to the bad
codeblock.json file name
).