Fix parseVersion regex atomicity, theme icon init race, changelog regex cache, alt text, INDENT_SIZE constant, and validate-workflows char class#71
Draft
mobileskyfi with Copilot wants to merge 2 commits into
Conversation
…ext, version tag, INDENT_SIZE, and validate-workflows regex Agent-Logs-Url: https://github.com/tikoci/restraml/sessions/bccf5a33-d14c-4617-9e0a-ad6a61aedbd1 Co-authored-by: mobileskyfi <45924209+mobileskyfi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix regex to handle pre-release identifiers correctly
Fix parseVersion regex atomicity, theme icon init race, changelog regex cache, alt text, INDENT_SIZE constant, and validate-workflows char class
Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seven independent code-quality and correctness fixes across
restraml-shared.js,tikapp.html, andvalidate-workflows.mjs.docs/restraml-shared.jsparseVersionregex — old pattern(beta|rc)?(\d+)?allowed qualifier and number to match independently, so7.22beta(no trailing digit) silently producedpreNum: 0and sorted incorrectly. New atomic group(?:(beta|rc)(\d+))?requires both or neither:initThemeSwitchericon init — icon was set inside aDOMContentLoadedlistener registered after the event already fired (all callers are bottom-of-<body>inline scripts), so the icon was never initialized. Replaced with a directel.innerHTMLassignment.new RegExp(...)was constructed on everyshowChangelog()call. Added_clHeaderRegexCache(Map keyed by version) so the pattern is compiled once per version.docs/tikapp.html<img>elements changed fromalt="MikroTik"toalt="".v1b→v1.0-beta.INDENT_SIZEconstant — magic literal2extracted to a named constant used intoSnippetScaffoldandbuildDynamicKeySuggestions.validate-workflows.mjs/[.*+?^${}()|[\\\]]/ghad an ambiguous]escape inside the class; corrected to/[.*+?^${}()|[\]\\]/g(backslash moved to end).Original prompt