[MAGNOLIA-7078] YAML exporter should respect YAML syntax for multi-line values Created: 28/Jun/17  Updated: 15/Mar/21

Status: Accepted
Project: Magnolia
Component/s: None
Affects Version/s: 5.5.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Maxime Michel Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLDEMO-219 Lists (dropdown, radio buttons) trunc... Closed
is related to MAGNOLIA-7118 YAML import uses platform encoding in... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: LD improvements
Story Points: 5

 Description   

In order to avoid consequences such as MGNLDEMO-219.

See this SO post for more details on the syntax: https://stackoverflow.com/a/21699210

The exporter should also not generate YAML files with two blank lines at their end, this makes the YAML invalid to linters.

It should also be smart enough to not generate the following output, where the final single quote really looks out of place:

    'body': '<p>Indonesia is probably the greatest place in the world to go on an island hopping, ferry riding, beach lounging adventure. With more than 17,000 islands to choose from, you&rsquo;re not going to run out. Visit Bali and its ancient temples and spend time on some of the more remote islands, where you&rsquo;ll enjoy a relaxed way of life, delicious food and fabulous scenery.</p>
'


 Comments   
Comment by Antti Hietala [ 15/Feb/18 ]

Re-estimated. Consider also using a YAML library.

Comment by Maxime Michel [ 16/Feb/18 ]

If using a library for generating YAML is too much of an effort or not possible for any other reason, we could at least consider using one for tests. Adding a YAML linter to make sure what we craft is indeed valid syntax-wise.

Generated at Mon Feb 12 04:20:31 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.