Let a spec reach the items nested inside a block - #79
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.
in2lambda source addrecords one block per top-level element of the markdown. A list item is one block from its marker to the end of everything nested under it, so a sheet written as\begin{enumerate} \item Q1 ... \begin{enumerate} \item (a) ... \item (b) ... \end{enumerate} \end{enumerate}(three of the four filter examples, and most tex sheets in the corpus) gives a spec one block per question and nothing to match a part against. t49 found this:part: ListItemreaches top-level items only.Record nested elements as blocks too. In in2lambda.source, walk each list item's children with sourcepos and record the nested list items, and the paragraphs of an item that holds nested lists, as blocks with ids that say where they sit (
b3.1,b3.2,b3.2.1), each with its own line range and adepth. A parent block's range still spans its children.source showprints the nested ids indented. A spec selector reaches them:part: ListItem depth=2, and the existingafterclause pairs a nested part with the question above it;question: ListItem depth=1keeps matching the parent. The coverage check counts a line as accounted for when any field or ignore mark covers it, so a question field quoted from a parent block whose children are parts is reported as an overlap only where two fields claim the same lines - state the rule you choose in the docs: a parent quoted whole and its children quoted too is a double assignment, so the spec quotes the parent's own paragraphs (b3.1) into the question and the nested items into the parts. Update tests/fixtures/specs for the three nested layouts so that each filter example is spec-able, and add the nested case to docs/source/spec.md and drafts.md.Done when
spec runwith the updated fixture specs assigns every block of PartsSepSol, PartPartSolSol and PartSolPartSol's example.tex,draft replayof an existing flat draft is unchanged, and the t49 test passes on the spec route for all four layouts.Workbench ticket t51.