Full Changelog: https://github.com/naturalcrit/marked-variables/commits/1.0.5
Fixes:
- Block-level variable definitions (
[var]: content) were still consuming characters from the input string when matched, even if they were invalid (not at the start of a new line). This was causing text to be eaten if it followed a variable call plus a colon.
Fixed by rewinding the regex lastIndex if the match was invalid.
- If a variable is injected via
setMarkedVariable()but the content is not a string (i.e., usingsetMarkedVariable(Number(42))), the parser would crash upon attempting to generate links, as it tries to call.matchon the contents which requires a string.
Fixed by casting all injected values with toString()
Cleanup:
- Updated many dependencies
- Updated ESLint rules and performed significant linting
- Removed several unused dependencies
Added support for Marked v17
- Updates dependencies to support Marked v17 as a peer dependency