BeaconCMS / BeaconCMS/beacon

`JSONEncoder` is incorrectly merging subsequent comments

Open
#600 0 comments 0 reactions 0 assignees View on GitHub
area:visual-editor bug
Dominant language
Elixir
Stars
1.3k
Forks
134
PR merge metrics
No merged PRs in 30d

Description

The following template

```elixir
~S||
```

Is being encoded as:

```
[%{"attrs" => %{}, "content" => [" comment 1 comment 2 "], "tag" => "html_comment"}]
```

It should generate two elements instead of merging into a single comment element.

Contributor guide

Open the contributing guide

Research direction

Start by locating the JSONEncoder entry point that processes the provided Elixir template and inspect how adjacent HTML comments are parsed. Reproduce the example with two consecutive comments, then verify that the encoded result contains two separate html_comment elements rather than one merged content value.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.