Added markdown parser (unified + remark) in player to replace regex replaces
As commented in #150
- Added
unifiedandremark-xxxlibraries to parse and re-convert to markdown after modifications - Added
mdast-builderfor a functional markdown AST creation
I'v changed some configurations and a dependency version:
- In
package.json:vscodefrom^1.1.25to^1.1.37. The old version is giving me an erorr in its postinstall script (a 404 in a request it makes) - In
tsconfig.json: Added theesModuleInteropoption to be able to use theimport ... from ...syntax instead ofimport * as ... from ...with the new dependencies (also, to avoid using therequire(...)syntax
If you think any of those changes may be problematic, I'll undo them (if that's the case, please tell me which import/require syntax would you use)
For now only the code fence part was replaced. If you think this approach is acceptable, I'll change the other regexes.
In the other hand, to replace the other regexes, I would like to know if there is any documentation about them. I understand the SHELL_SCRIPT one, but I'm not sure about the use case of the COMMAND and TOUR_REFERENCE ones
I just tried this branch, and it seems like step references are broken. Are you seeing that behavior?
I just tried this branch, and it seems like step references are broken. Are you seeing that behavior?
Fixed. The AST-to-string was escaping literal characters with backslashes (square brackets not being part of a link), so the regex wasn't working. I changed it to first apply the regex and then the AST. Anyway, I wouldn't merge this until all the replace-like modifications are changed to the parser
Fff