SparkPost / SparkPost/developers.sparkpost.com

Is it possible to parse templates *in order*?

Open
#377 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
API Blueprint
Stars
18
Forks
9
Avg merge
2d 1h
Merged PRs (30d)
3

Description

I pasted a template from another system and I'm running into a weird error with it while converting it to Sparkpost:

  1. Sparkpost tells me there's an error at line 174.
  2. I delete the entire code block that ends at that line.
  3. Now Sparkpost tells me there's an error at line 162.

What's going on here? How was line 162 OK before, when the error was at line 174? Missing ending tag or something?

Anyway, I keep deleting, and ultimately the error was way earlier,

line 130: substitution value 'discussion' did not exist or was null

So it wasn't a missing tag, but a missing substitution value. This should have been flagged immediately.

Sparkpost parse in order

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the template conversion described in the issue and inspect how parsing reports errors when an earlier substitution value is missing. The work is done when the earliest actionable error, such as the missing “discussion” value at line 130, is reported first rather than a later line error.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.