luckyframework / luckyframework/website

Malformed string literal for tag attribute

Open
#1,235 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Crystal
Stars
39
Forks
62
PR merge metrics
No merged PRs in 30d

Description

From https://github.com/luckyframework/lucky/issues/1823 :

When using the https://luckyframework.org/html tool to convert
`

Get Some HTML, Including A Custom Header in the Request
` to lucky html, we get invalid code :

`div "Get Some HTML, Including A Custom Header in the Request", hx_get: "/example", hx_headers: "{"myHeader": "My Value"}" `

This results in a compile error :

`Error: unexpected token: "myHeader"`

Contributor guide

No contributing guide indexed for this repository

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 reported input with the Lucky HTML tool and inspect how the hx_headers attribute is converted. Trace the string escaping that produces the malformed Crystal literal, then verify that the generated output compiles and preserves the embedded JSON header value.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.