Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax Tests with partial symbols not recognized #384

Closed
keith-hall opened this issue Mar 3, 2023 · 1 comment · Fixed by #385
Closed

Syntax Tests with partial symbols not recognized #384

keith-hall opened this issue Mar 3, 2023 · 1 comment · Fixed by #385
Labels
Milestone

Comments

@keith-hall
Copy link
Member

PackageDev currently doesn't correctly recognize syntax test files with partial-symbols in the meta line as syntax test files.

# SYNTAX TEST partial-symbols "Dockerfile.sublime-syntax"

Subsequently, there are no completions when pressing Tab after a # in a file with this header.

I guess there is something wrong with this line:
https://github.com/SublimeText/PackageDev/blob/master/plugins/syntaxtest_dev.py#L35

indeed, executing this in the ST Python console shows None:

import re
syntax_test_header_regex = re.compile(
    r'^(?P<comment_start>\s*.+?)'
    r'\s+SYNTAX TEST\s+'
    r'(?P<test_mode>(?:partial-symbols|(?:reindent(?:-un(?:indented|changed))?)\s+)*)'
    r'"(?P<syntax_file>[^"]+)"'
    r'\s*(?P<comment_end>\S+)?$'
)
first_line = '# SYNTAX TEST partial-symbols "Dockerfile.sublime-syntax"'
print(syntax_test_header_regex.match(first_line))
@FichteFoll
Copy link
Member

FichteFoll commented Mar 3, 2023

Looks like whitespace isn't matched properly.

@FichteFoll FichteFoll added this to the 3.4.2 milestone Mar 3, 2023
@FichteFoll FichteFoll modified the milestones: 3.4.2, 3.5.0 May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants