Skip to content

Need to unescape escape sequences before passing text to embedded formatter #713

Closed
@kt3k

Description

@kt3k

An example:

css`
.bg-\\[\\#86efac\\] {
  background-color: #86efac;
}
`

This currently causes syntax error with embedded language formatter (malva) because .bg-\\[\\#86efac\\] is invalid CSS selector. We need to unescape .bg-\\[\\#86efac\\] part before passing it to embedded formatter, and then escape it again.

ref https://github.com/denoland/fresh/blob/3900aa70d4b305080f42e5814bc832b22aee2d39/init/src/init.ts#L317-L319

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions