Closed muescha closed 4 years ago
ok - my mistake: with text.replace(exp, embed)
you replace the text between the {%
and %}
drawbacks if the liquid tags are in the middle of text:
If the liquid tags are in the middle of the text, the expected results may not be achieved.
I thought I stated it in the README that liquid tags must have a line space up and down, but I just checked to discover I didn't. I'll fix that now
This way, the plugin can effectively capture the paragraph with the liquid tags.
Note that the liquid tags must have a line space above and below. This helps the plugin capture the tags correctly. Here's what I mean:
Here it is on the README.md
Thanks for pointing this out
if i review the code:
https://github.com/dillionmegida/gatsby-remark-liquid-tags/blob/f1c4b5fa4d7217a670298f7a73209bb013354a11/src/index.js#L23
should this not be:
/^{\%.*\%}$/g
because you replace the full paragraph and not just the value between{%
and%}
?https://github.com/dillionmegida/gatsby-remark-liquid-tags/blob/f1c4b5fa4d7217a670298f7a73209bb013354a11/src/index.js#L60-L62