Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Syntax highlighting for keywords at the beginning of line does not work #70

@moxaj

Description

@moxaj

Description

^ Title.

Steps to Reproduce

Type any keyword at the beginning of a line.

Expected behavior: [What you expect to happen]

Keyword hightlighted as a keyword (constant.keyword.clojure)

Actual behavior: [What actually happens]

Keyword is not highlighted as a keyword.

Reproduces how often: [What percentage of the time does it reproduce?]

Always.

Versions

Any version.

Additional Information

Relevant regex:

'(?<=(\\s|\\(|\\[|\\{)):[a-zA-Z0-9\\#\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}|\\,))'

The positive lookbehind states that the colon should be preceded by a whitespace, (, [ or a [ character. Obviously neither of those precede the colon when the keyword is at the beginning of a line. Adding the word boundary anchor (\b) to the possible characters would fix it, however the regex engine cannot handle variable-length lookbehinds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions