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

Lazy instantiation of CommandMagic and FileMagic #3871

Merged
merged 2 commits into from
Jan 30, 2025
Merged

Conversation

PHPirates
Copy link
Collaborator

Fix #3846 maybe
Fix #3866 maybe

@PHPirates PHPirates added this to the Next milestone Jan 29, 2025
@@ -20,7 +20,9 @@
"""(?=\\DescribeEnv\{?(?<key>[a-zA-Z_:]+\*?)}?\s*(?<value>[\s\S]{0,500}))""".toRegex()

// e.g. \newenvironment{proof}{...} \newenvironment|\newtheorem|\NewDocumentEnvironment|\DeclareDocumentEnvironment|\ProvideDocumentEnvironment
private val directDefinitionRegex = """(${CommandMagic.environmentDefinitions.joinToString("|").replace("\\", "\\\\")})\*?\{(?<key>[a-zA-Z_:]+)}(?<value>)""".toRegex()
private val directDefinitionRegex by lazy {
"""(${CommandMagic.environmentDefinitions.joinToString("|").replace("\\", "\\\\")})\*?\{(?<key>[a-zA-Z_:]+)}(?<value>)""".toRegex()

Check warning

Code scanning / QDJVMC

Annotator Warning

Empty group
@PHPirates PHPirates merged commit 8d217d2 into master Jan 30, 2025
11 checks passed
@PHPirates PHPirates deleted the noclassdeffound branch January 30, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment