Blank line rendering in text templates
- Dominant language
- Objective-C
- Stars
- 1.4k
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
Consider a text template:
```
{{% CONTENT_TYPE: TEXT }}
{{ statement-1 }}
{{ statement-2 }}
{{ statement-3 }}
{{ statement-4 }}
{{ statement-5 }}
```
With data:
```
{
statement-1: "Did she leave?",
statement-3: "Yes.",
statement-5: "So it's time then to start up the interfabric particle degenerator."
}
```
This generates:
```
Did she leave?
Yes.
So it's time then to start up the interfabric particle degenerator.
```
However we desire to consume lines that render as NULL to produce:
```
Did she leave?
Yes.
So it's time then to start up the interfabric particle degenerator.
```
My thoughts were that a line render pragma could be defined:
```
<<% LINE_RENDER : CONSUME_BLANK >>
```
This means: if a processed line (i.e.: a line containing a Mustache declaration) evaluates to blank (as defined by the standard library) then consume the line (i.e.: do not output the empty content or end of line char).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing text-template rendering behavior described in the issue and the proposed LINE_RENDER: CONSUME_BLANK pragma. Determine how processed lines that evaluate to blank are currently emitted; done means a supported approach produces the three populated lines without intervening blank lines.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100