silvenon / remark-smartypants

remark plugin to implement SmartyPants
MIT License
54 stars 3 forks source link

fix handle quotes between links, bold text and other text elements #80

Closed dimaMachina closed 9 months ago

dimaMachina commented 10 months ago

fixes https://github.com/silvenon/remark-smartypants/issues/74

dimaMachina commented 9 months ago

@2wheeh check my last commit

silvenon commented 9 months ago

(It's possible that for Prettier you'll need to merge in latest main.)

dimaMachina commented 9 months ago

Everything is good, just the Prettier task is failing for the test file, all you need to do is: npx prettier --write .

I created a pre-commit hook on main, if you merged that changed into your branch. It can be installed by running npm run setup, that way all your commits will be prettified right upon committing.

finally back to the computer, applied changes, and fixed another possible edge cases with inline code blocks

https://github.com/dimaMachina/remark-smartypants/blob/fe9c3ee4f501f34aae65524866c4e204b70f857d/index.test.js#L53-L71

dimaMachina commented 9 months ago

It seems like in the meantime Vitest no longer needs to escape quotes in snapshots (notice that some tests fail), so update that and we're good to go!

locally it was not fail, strange, just removed escaping to see if it fixes tests on CI

silvenon commented 9 months ago

These changes have been published in v2.1.0!