Dedent list items when quoting them into fields - #65
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running the agent on a real sheet (PHYS40002 PS9) shows a field quoted from a list-item block keeps the markdown's continuation indent: q1.text is "A person walks ... from the centre\n to the edge of a horizontal ...". The spec's strip pattern removes the "1. " marker from the first line only. Four leading spaces after a blank line render as a code block in Lambda Feedback, and every line of the field carries whitespace the author never wrote.
When a field is quoted from the source - by spec run, question add, part add or question solution - the block's own indentation should come off every line uniformly: the list marker's width from the first line and the same number of spaces from the continuation lines, as commonmark itself reads a list item. The provenance ranges stay the source lines; only the value is dedented. Done when the spec and draft fixtures whose sources hold list items have dedented expected values, and a field quoted from a nested list dedents by its own depth.
Workbench ticket t36.