Skip to content

Labels with dots#6

Open
KoalaMauve wants to merge 3 commits into
sunshaoce:masterfrom
KoalaMauve:fix/labels-with-dots-detection
Open

Labels with dots#6
KoalaMauve wants to merge 3 commits into
sunshaoce:masterfrom
KoalaMauve:fix/labels-with-dots-detection

Conversation

@KoalaMauve
Copy link
Copy Markdown

I was playing around and testing edge cases, and found that labels with dots inside weren't being detected.
They're edge cases and not recommended, but still valid and usable (GNU / LLVM compatible).

As shown below, for the valid label label.with.dots:, label.with wasn't detected as a label but as regular source code.
Only .dots: appeared as a label. It's caused by the regexp only allowing dots at the beginning (non-exportable labels convention).

label with source dots label

I've modified the regexp to fix this, allowing dots inside labels. The whole label.with.dots: is now detected:

fixed

To make this case easy to test, I've also added an example file with various labels.

⚠️ I've incremented the version number from .35 to .36, if you use a different versioning scheme, feel free to change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant