Skip to content
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

Page Text cut off #3223

Closed
NicoHood opened this issue Feb 13, 2021 · 1 comment
Closed

Page Text cut off #3223

NicoHood opened this issue Feb 13, 2021 · 1 comment
Assignees

Comments

@NicoHood
Copy link
Contributor

Checkout this:

---
process:
    twig: true
---

Falls du den Link mit einem Logo auschmücken möchtest findest du diese unter [Werbemittel](/werbemittel). Wir werden deinen Vorschlag zeitnah prüfen und einpflegen. Bei weiteren Fragen [**schreibe uns einfach eine Email.**]({{ theme_var('contact_url') }})

It will render as (Highlighted the error):

Falls du den Link mit einem Logo auschmücken möchtest findest du diese unter Werbemittelrüfen und einpflegen. Bei weiteren Fragen schreibe uns einfach eine Email.

  • The Text is cut off
  • The first Link is wrong, the 2nd link is used for some reason

I can imagine that this was introduced by #3162

@mahagr
Copy link
Member

mahagr commented Feb 17, 2021

It looks like the Markdown parser didn't like the twig tags. This was an issue even without the twig turned on, so not result from the previous bug fix.

Please do not use twig inside markdown syntax as markdown gets by default parsed first, which causes the content to potentially break. In this case, I made the temporary value look like a URL so it works, but basically, the value coming from the twig will not be parsed correctly by Markdown (is it instead used as it is).

In cases like this, it may be a better idea to either use HTML instead of markdown around the twig or make Grav parse twig first.

@mahagr mahagr closed this as completed Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants