avh4 / avh4/elm-format

Initial double-quote in a triple-quoted literal should be escaped

Open
#657 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1.3k
Forks
147
PR merge metrics
No merged PRs in 30d

Description

In the code `""""text"""`, it's hard to tell there's a typo. Formatting this as `"""\"text"""` even though it's not strictly necessary would help readability.

(Note: double-quotes at the end of triple-quoted strings are escaped because otherwise it would be parsed by elm-compiler as starting the closing delimiter.)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the formatter entry point that handles Elm triple-quoted string literals, using the examples `""""text"""` and `"""\"text"""` as the expected case. Confirm the formatted output escapes the initial double quote for readability while preserving the existing handling of quotes at the closing delimiter.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm
Domain
tooling
Issue type
Feature
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.