From df4335fd26068b56b013b01d4fab513a340107cf Mon Sep 17 00:00:00 2001 From: dzhuang Date: Tue, 11 Jul 2017 11:25:01 +0800 Subject: [PATCH] Fix process_yaml_for_expansion in SandBox #344 --- course/content.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/course/content.py b/course/content.py index d5f7db03..7c215db0 100644 --- a/course/content.py +++ b/course/content.py @@ -401,7 +401,7 @@ def process_yaml_for_expansion(yaml_str): line_count = len(lines) while i < line_count: - l = lines[i] + l = lines[i].rstrip() yaml_block_scalar_match = YAML_BLOCK_START_SCALAR_RE.search(l) if yaml_block_scalar_match is not None: @@ -428,7 +428,7 @@ def process_yaml_for_expansion(yaml_str): if line_indent <= block_start_indent: break else: - unprocessed_block_lines.append(l) + unprocessed_block_lines.append(l.rstrip()) i += 1 if not allow_jinja: -- GitLab