Skip to content

Comment in line continuation breaks highlighting #13

@devnev

Description

@devnev

As per https://docs.docker.com/reference/dockerfile/#format, the following are equivalent

RUN echo hello \
# comment
world

RUN echo hello \
world

However, in Zed, after such a comment, the syntax highlighting misbehaves. The way it turns out depends on the command before the comment, e.g. with

FROM alpine
RUN echo hello \
    # comment
    world
ENTRYPOINT [ "/bin/sh" ]

the only issue is that the worldtoken is highlighted as a shell command, whereas with

FROM alpine
ENV A=1 \
    # comment
    B=2
ENTRYPOINT [ "/bin/sh" ]

the ENTRYPOINT (and all later tokens) are not highlighted, except some special characters like @ and :

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions