rcjsuen / dockerfile-language-service

Dockerfile language service for providing an API to create feature-rich Dockerfile editors in JavaScript.
MIT License
16 stars 2 forks source link

Embedded comments with a trailing escape character disables hovers for variables that follow it #62

Closed rcjsuen closed 4 years ago

rcjsuen commented 4 years ago
FROM alpine
ENV var=value
RUN a \
#c \
$var

Hovering over $var should resolve to value.

import { DockerfileLanguageServiceFactory } from './main'
const service = DockerfileLanguageServiceFactory.createLanguageService();
let content =
    `FROM alpine
ENV var=value
RUN a \\
#c \\
$var`;
let items = service.computeHover(content, { line: 4, character: 3 });
console.log(items);

However, null is returned instead.

null