-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline component preceded by something other than space #77
Comments
Thanks for your feedback @QuentinRoy I think we could add an exception for some characters, I believe that What do you think @farnabaz ? |
Out of curiosity, what's the rational for preventing inline-components when there is a character preceding |
Currently components are only valid in one of these situations:
Also Removing preceding characters validation is also seems good idea. We might have it later 👍 |
Is your feature request related to a problem? Please describe.
Currently, I cannot find a way to make something like the following to work:
It seems if an inline component is preceded by anything other than a space, it remains as is. There is a way to make inline components followed by something other than a space (the dummy props trick), but not preceded.
Describe the solution you'd like to see
Ideally, the above code would work as is:
would produce
However, if there is a syntax issue than I'm not seeing, maybe we could introduce a special marker, for example
!
:Describe alternatives you've considered
Adding a space before the component works, but then an extra space is rendered before the element:
produces:
Wrapping the component in a span also works, but the extra element is rather unfortunate:
produces:
Currently I'm simply opting out and use inline html, but one has to use
allowDangerousHtml
inremark-rehype
:Minimal reproducible example (using Deno for simplicity)
https://dash.deno.com/playground/early-boar-75
The text was updated successfully, but these errors were encountered: