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

Injection regex is specified too broadly for tree-sitter-c grammar #339

Open
eugmes opened this issue Dec 23, 2019 · 0 comments
Open

Injection regex is specified too broadly for tree-sitter-c grammar #339

eugmes opened this issue Dec 23, 2019 · 0 comments

Comments

@eugmes
Copy link

eugmes commented Dec 23, 2019

Summary

Injection regex is specified too broadly for tree-sitter-c grammar. It matches anything that contains letter 'c' in it.

Motivation

This behavior is confusing when one tries to add injection points for languages like ocaml (not possible right now anyway).

The current code is here:

injectionRegex: 'c|C'

Perhaps it should better be changed to something like:

injectionRegex: '^(c|C)$'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant