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

Linebreaks in markdown front-matter fields don't work #1324

Closed
timmschroeder opened this Issue Mar 15, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@timmschroeder

timmschroeder commented Mar 15, 2017

Expected behaviour

In a custom markdown field there should be a linebreak
when I type two spaces at the of the line.

Actual behaviour

No linebreaks. If I save the page the two spaces are gone.

@jasonvarga

This comment has been minimized.

Show comment
Hide comment
@jasonvarga

jasonvarga Mar 15, 2017

Member

Dupe of https://lodge.statamic.com/questions/2242-how-to-do-a-linebreak-in-v2-with-markdow but I don't see any issue here so I'll leave it.

It's the YAML parser we're using, which strips whitespace. Just haven't found a fix yet.

Member

jasonvarga commented Mar 15, 2017

Dupe of https://lodge.statamic.com/questions/2242-how-to-do-a-linebreak-in-v2-with-markdow but I don't see any issue here so I'll leave it.

It's the YAML parser we're using, which strips whitespace. Just haven't found a fix yet.

@jackmcdade jackmcdade added the blocked label Mar 16, 2017

@jcohlmeyer

This comment has been minimized.

Show comment
Hide comment
@jcohlmeyer

jcohlmeyer Apr 27, 2017

There is now an option to use hard_warp in php markdown. It could be a parameter on markdown?

IE: {{ content | markdown:hard_wrap }}

michelf/php-markdown@a0012c0

jcohlmeyer commented Apr 27, 2017

There is now an option to use hard_warp in php markdown. It could be a parameter on markdown?

IE: {{ content | markdown:hard_wrap }}

michelf/php-markdown@a0012c0

@jasonvarga

This comment has been minimized.

Show comment
Hide comment
@jasonvarga

jasonvarga Aug 28, 2017

Member

In 2.6.7, there is an option to enable @jcohlmeyer 's hard wrap behavior. This could be a solution for you until the bug in the YAML parser is fixed.

Member

jasonvarga commented Aug 28, 2017

In 2.6.7, there is an option to enable @jcohlmeyer 's hard wrap behavior. This could be a solution for you until the bug in the YAML parser is fixed.

@jasonvarga

This comment has been minimized.

Show comment
Hide comment
@jasonvarga

jasonvarga May 17, 2018

Member

This is fixed for 2.9 because we've added the Symfony YAML parser.
Once you upgrade, set yaml_parser: symfony in system.yaml
For fresh 2.9+ installs, you get symfony by default.

Member

jasonvarga commented May 17, 2018

This is fixed for 2.9 because we've added the Symfony YAML parser.
Once you upgrade, set yaml_parser: symfony in system.yaml
For fresh 2.9+ installs, you get symfony by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment