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
I'm working on integrate Flexmark with a Liquid template so my users can create custom HTML emails notifications. I do not want Flexmark to process the variables that will get injected into the Liquid template.
I thought I'd be able to just process the template with Flexmark first and then process the rendered results into my Liquid templating engine, but this causes some issues with statements like:
(a link)[{{ MyToken }})
Since the Liquid placeholder has spaces, Flexmark ends up ignoring the link and will not render it. In this specific case I could remove the spaces around the brackets, but that doesn't fix all uses cases.
Flexmark also ends encoding text inside the template. For example:
{% if Text == "here" %}
becomes:
{% if Text == "here" %}
Which changes the meaning and no longer works as expected.
So it would appear to resolve my problem, I need to get Flexmark to ignore the Liquid/Jekyll commands.
It would appear I could develop an extension to do this, but I'm wonder if there isn't something already there that would do this. Something that would allow me to define a start/end sequence to basically have Flexmark treat the text as a literal text.
I've seen the Flexmark Jekyll extension, but from my testing it appears trying to process blocks, not simply skipping them (unless I'm misunderstanding things, which is totally possible!)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm working on integrate Flexmark with a Liquid template so my users can create custom HTML emails notifications. I do not want Flexmark to process the variables that will get injected into the Liquid template.
I thought I'd be able to just process the template with Flexmark first and then process the rendered results into my Liquid templating engine, but this causes some issues with statements like:
Since the Liquid placeholder has spaces, Flexmark ends up ignoring the link and will not render it. In this specific case I could remove the spaces around the brackets, but that doesn't fix all uses cases.
Flexmark also ends encoding text inside the template. For example:
becomes:
Which changes the meaning and no longer works as expected.
So it would appear to resolve my problem, I need to get Flexmark to ignore the Liquid/Jekyll commands.
It would appear I could develop an extension to do this, but I'm wonder if there isn't something already there that would do this. Something that would allow me to define a start/end sequence to basically have Flexmark treat the text as a literal text.
I've seen the Flexmark Jekyll extension, but from my testing it appears trying to process blocks, not simply skipping them (unless I'm misunderstanding things, which is totally possible!)
Beta Was this translation helpful? Give feedback.
All reactions