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

Fix trimming whitespace around includes #531

Open
preaction opened this issue Feb 1, 2017 · 0 comments
Open

Fix trimming whitespace around includes #531

preaction opened this issue Feb 1, 2017 · 0 comments
Labels

Comments

@preaction
Copy link
Owner

When we use the include helper, we are often forced to have extra whitespace (even when using <%= include '...' %>. This can cause the Markdown to be rendered incorrectly, such as when building a list with includes as the values.

The normal Mojolicious syntax of using an = on the closing tag to trim whitespace works, but it trims all whitespace before and after, making Markdown render even more incorrectly.

We should try to do the right thing when including templates and not introduce any unexpected whitespace. If that's not possible, we should introduce a trim helper function that will at least trim whitespace around the include (while still allowing whitespace around the template directive itself), like <%= trim include '...' %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant