OJS: Template Literals Markdown #3980
Replies: 1 comment 3 replies
-
(This is a good one!) Unfortunately, this is a bug/limitation on our treatment of OJS. What happens here is that we support the resolution of OJS reactives into DOM values, but we do not support the resolution of OJS reactives into DOM attributes (which is what the content of a link resolves to, This will be very hard to fix in general. Specifically, this is not a context free transformation (the result of the OJS transformation depends on the surrounding syntax), and that's hard to do with our present setup. It requires our infrastructure to know precisely where each OJS reference lives, what Markdown constructs resolve to what DOM construct, keeping track of the association, and building the correct code paths. That's genuinely unfortunate, because I would like to make this work. We just won't be able to in the near term. You can work around this by creating a link that behaves like a button, and has an OJS event handler. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey I am using template literals in my markdown and ran into this. Not sure what is going on here.
I have an observable input filtering my dataset. I am just looking up twitter usernames and linking it in markdown.
This twitter link works fine when I write in markdown in OJS.
When I write it like this
https://twitter.com/${rep.twitter}
or this${rep.twitter}
in quarto markdown it works fine and shows the representative's twitter account.But when I try to link it like this
[Twitter](https://twitter.com/${rep.twitter})
it does not work it links tohttps://twitter.com/$%7Brep.twitter%7D
.How am I supposed to format it to link correctly within quarto markdown?
Beta Was this translation helpful? Give feedback.
All reactions