From 73d9169cab1fc48b1c864b0262098d7a3690f32e Mon Sep 17 00:00:00 2001 From: Mathias Bynens <mathias@qiwi.be> Date: Wed, 17 Oct 2018 13:04:47 +0200 Subject: [PATCH] Generation: fix more YAML frontmatter writer to eliminate errant newlines from yaml.dump() This applies the fix from #1821 to the remaining frontmatter properties that consist of lists. Ref. https://github.com/tc39/test262/pull/1821/files#r222811633. Ref. #1817. --- tools/generation/lib/template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/generation/lib/template.py b/tools/generation/lib/template.py index d5fc78d846..c0a12ccf02 100644 --- a/tools/generation/lib/template.py +++ b/tools/generation/lib/template.py @@ -160,14 +160,14 @@ class Template: flags += case_values['meta'].get('flags', []) flags += self.attribs['meta'].get('flags', []) flags = list(OrderedDict.fromkeys(flags)) - lines += ['flags: ' + yaml.dump(flags).strip()] + lines += ['flags: ' + re.sub('\n\s*', ' ', yaml.dump(flags).strip())] includes = [] includes += case_values['meta'].get('includes', []) includes += self.attribs['meta'].get('includes', []) includes = list(OrderedDict.fromkeys(includes)) if len(includes): - lines += ['includes: ' + yaml.dump(includes).strip()] + lines += ['includes: ' + re.sub('\n\s*', ' ', yaml.dump(includes).strip())] if case_values['meta'].get('negative'): if self.attribs['meta'].get('negative'): -- GitLab