Closed
Conversation
Accessibility by default is important. The colors with a too low contrast were adjusted just so much that they match the required contrast of 4.5. Part of pygments#1718.
* Correctly identify whitespace. * Merge consecutive tokens where possible. * Consistently use String.Double for the opening and closing quotation marks
Correctly identify whitespace.
Use a simpler expression to match comments in HTML/XML.
wcag-contrast-ratio is now a build-time dependency for the docs.
Some dark styles did not define a color for every token type,
resulting in black text (the browser default for text) on dark
backgrounds (defined by the styles) unless the web page had some
CSS to remedy that like:
body { color: white; background: black; }
We however don't want the readability of styles to rely on external CSS.
Part of pygments#1718. Fixes some unreadable styles reported in pygments#1526.
Contributor
Author
|
Ooop, looks like I didn't notice the Alloy tests, will fix |
Alloy (http://alloytools.org/) facts can take a string token in addition to an identifier. This is because the name isn't actually used for facts, it's just for readability. This is technically undocumented behavior, but it's widely used in legacy specs and is handled this way in the official Alloy IDE.
Alloy 6 adds temporal logic to Alloy. This includes the following keywords: * Three new symbols: `'` (prime), `..` (step interval), and `;` (sequential composition) * Five future-time keywords: `always`, `after`, `eventually`, `until`, `releases` * Five past-time keywords: `historically`, `before`, `once`, `since`, `triggered` * A new `steps` keyword for specifying a range to model check. See here for full changes: https://alloytools.org/alloy6.html
Legacy alloy uses `'` to distinguish variables:
all b, b': Foo | bar
But since Alloy 6 makes `'` into an operator, the new recommendation is
to use `"`:
all b, b": Foo | bar
See
https://alloytools.org/alloy6.html#compatibility-with-pre-6-models.
The lexer currently reads `b"` as starting a string. This commit fixes
this by only having `"` begin a string if it's the start of a token.
Additionally, `'` is removed from identifiers.
Alloy 6 recommends changing `'` in legacy specs to `"`. Since this is a breaking change, the golden test is updated to reflect that.
Contributor
Author
|
Running |
Collaborator
|
@birkenfeld Do you have an idea what might be going on here? |
Contributor
|
I get the error locally with an up-to-date checkout of It seems sensible because this regex will never match |
Alloy (http://alloytools.org/) facts can take a string token in addition to an identifier. This is because the name isn't actually used for facts, it's just for readability. This is technically undocumented behavior, but it's widely used in legacy specs and is handled this way in the official Alloy IDE.
Alloy 6 adds temporal logic to Alloy. This includes the following keywords: * Three new symbols: `'` (prime), `..` (step interval), and `;` (sequential composition) * Five future-time keywords: `always`, `after`, `eventually`, `until`, `releases` * Five past-time keywords: `historically`, `before`, `once`, `since`, `triggered` * A new `steps` keyword for specifying a range to model check. See here for full changes: https://alloytools.org/alloy6.html
Legacy alloy uses `'` to distinguish variables:
all b, b': Foo | bar
But since Alloy 6 makes `'` into an operator, the new recommendation is
to use `"`:
all b, b": Foo | bar
See
https://alloytools.org/alloy6.html#compatibility-with-pre-6-models.
The lexer currently reads `b"` as starting a string. This commit fixes
this by only having `"` begin a string if it's the start of a token.
Additionally, `'` is removed from identifiers.
Alloy 6 recommends changing `'` in legacy specs to `"`. Since this is a breaking change, the golden test is updated to reflect that.
As mentioned in pygments#1963 (comment), the problem is that the rule matched . before .., so .. would never be matched. Fixed here.
Contributor
Author
|
Only a year late, but I fixed the regexlint issue, let's see if this passes the check! |
birkenfeld
pushed a commit
that referenced
this pull request
Nov 19, 2022
Member
|
Tests are fine. Since there were tons of unrelated changes and conflicts in the branch, I manually cherry-picked the changes and pushed them in f1283e6. |
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.
Last Tuesday Alloytools released a new, backwards-incompatible version. The biggest change is that
'is now an operator and no longer a valid identifier token. The team is encouraging people to use"instead, which the current Pygments lexer assumes automatically starts a string.This change adds the new keywords, modifies how the lexer handles
", and closes an edge case in using strings forfactdefinitions. See commit messages for further details on each.