You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It is common for CMSs to automatically replace three hyphens (e.g. ---) with an em-dash (—).
Describe the solution you'd like
Similar to how Idyll will automatically insert smart quotes, it should also convert hyphens to em-dashes, possibly with an option for users to opt-in/out of this behavior.
This can be added via a compiler plugin. It should be added to the list of default plugins; the smartquote plugin would be a good starting point to copy, as that also modifies an article's text.
The text was updated successfully, but these errors were encountered:
I was going to have a go at this Matthew, but it seems that post.js is no longer in existence. I will read through the source of the compiler and see if I can make sense of the change logs etc. But if you have time to update the information about this issue, then it may make things a little quicker.
It looks like you moved to a set of plugins in the compiler, and so seemingly the correct way to this, would also be via a plugin?
Is your feature request related to a problem? Please describe.
It is common for CMSs to automatically replace three hyphens (e.g.
---
) with an em-dash (—
).Describe the solution you'd like
Similar to how Idyll will automatically insert smart quotes, it should also convert hyphens to em-dashes, possibly with an option for users to opt-in/out of this behavior.
This logic should be added to the compiler in the same spot the smartquote logic currently exists (https://github.com/idyll-lang/idyll/blob/master/packages/idyll-compiler/src/processors/post.js#L26-L32).This can be added via a compiler plugin. It should be added to the list of default plugins; the smartquote plugin would be a good starting point to copy, as that also modifies an article's text.
The text was updated successfully, but these errors were encountered: