• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

accordproject / template-engine / 25955341741 / 2
64%
main: 64%

Build:
DEFAULT BRANCH: main
Ran 16 May 2026 06:49AM UTC
Files 56
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 May 2026 06:46AM UTC coverage: 71.535% (+0.3%) from 71.259%
25955341741.2

push

github

web-flow
fix: draft() throws when {{#ulist}}/{{#olist}} contains direct variable references (#145) (#148)

When a `{{#ulist}}` / `{{#olist}}` body contains direct variable references
(e.g. `{{volumeAbove}}`) with no leading list marker (`- ` or `1. `), the
markdown parser does not wrap the body in a CommonMark `List > Item`
structure — it produces a `Paragraph` directly under the
`ListBlockDefinition`. The existing recursion in `generateRecursiveBlocks`
blindly accessed `context.nodes[0].nodes[0]`, which assumed the
`List > Item` wrapping. With the wrapping absent, that path pointed at a
leaf node (a `VariableDefinition` or `Text`), and `generateAgreement` was
then called with a `VariableDefinition` as its root `templateMark`. The
traversal visited the root with an empty `this.path`, so `getJsonPath`
threw `Error: Paths must be supplied`. When the first inline node was a
`Text` rather than a `VariableDefinition`, no error was thrown but each
output `Item` was silently empty.

Detect whether the parser produced a `CommonMark.List` wrapper and pick
the per-iteration template accordingly: when wrapped, descend into
`firstChild.nodes[0]` (the `Item` template) and unwrap its children into
each new output `Item` (preserving existing behaviour). Otherwise treat
`firstChild` itself as the per-iteration template and wrap the processed
block as the sole child of each new output `Item`, which keeps a valid
`Item > Paragraph > inline...` hierarchy.

Adds two snapshot-based fixtures (`volumediscountulist`,
`volumediscountolist`) and three assertion-based regression tests that
cover both failure modes (variable as the first inline node, and a
leading text inline node).

Signed-off-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>

599 of 878 branches covered (68.22%)

Branch coverage included in aggregate %.

1409 of 1929 relevant lines covered (73.04%)

1042.95 hits per line

Source Files on job macos-latest - 25955341741.2
  • Tree
  • List 56
  • Changed 17
  • Source Changed 1
  • Coverage Changed 17
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 25955341741
  • 7286faa5 on github
  • Prev Job for on main (#25940209640.3)
  • Next Job for on main (#25961387407.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc