Automattic / Automattic/juice

codeBlocks in options-file not working

Open
#358 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.3k
Forks
233
Avg merge
1d 10h
Merged PRs (30d)
8

Description

Though I believe the initial issue of defining codeBlocks in the options json to have been resolved in #327, I have not been able to get my email platform (Listrak) merge tags to work properly.

From my `options-file`:

```json
"codeBlocks": {
"ltkMerge": {
"start": "<<",
"end": ">>"
}
}
```

HTML:
```html

Dear <>,


```

(where `basic information` is a field group, `firstname` is a field, and `default` is the fallback value if blank)

Out:
```html

Dear <>,


```

Is this because these tags live inside another semantic element? This will be the case 100% of the time since they are only placeholders for a text string. Or is the issue that there are other chars `\` and attributes allowed inside the `<< >>` tag itself?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported output with the shown options-file codeBlocks configuration and HTML containing the Listrak merge tag. Trace how codeBlocks and tags containing backslashes and attributes are parsed, then verify that the merge tag remains intact while ordinary HTML is processed correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.