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

Update the pg-codemirror-editor to pull in a bugfix. #2679

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Mar 1, 2025

There is early termination code in the CodeMirror PGML parser that is not actually part of PGML. It is there to catch impartial constructs that occur while typeing. For instance, say you have already typed [` `], and then you start to type [$ inside that. This code terminates the outer block so that syntax highlighting continues to work after the outer block.

Unfortunately, it was also early terminating 'balance' blocks inside outer blocks even though those could contain the terminator of the outer block. This can cause tokens inside the block to be incorrectly terminated early. For example, in [@ '[@ "inner code" @]' @]** the single quote starts a 'balance' type block, and the @] inside the string tries to terminate the outer [@ block. Of course that example isn't something you should do any, but this was seen in a more complicated construct than that example. That sort of thing is often needed for cases inside a BEGIN_PGML_SOLUTION/END_PGML_SOLUTION block.

There is early termination code in the PGML parser that is not actually
part of PGML. It is there to catch impartial constructs that occur while
typeing.  For instance, say you have already typed ``[` `]``, and then
you start to type `[$` inside that.  This code terminates the outer
block so that syntax highlighting continues to work after the outer
block.

Unfortunately, it was also early terminating 'balance' blocks inside
outer blocks even though those could contain the terminator of the outer
block.  This can cause tokens inside the block to be incorrectly
terminated early.  For example, in `[@ '[@ "inner code" @]' @]**` the
single quote starts a 'balance' type block, and the `@]` inside the
string tries to terminate the outer `[@` block. Of course that example
isn't something you should do any, but this was seen in a more
complicated construct than that example.  That sort of thing is often
needed for cases inside a BEGIN_PGML_SOLUTION/END_PGML_SOLUTION block.
@pstaabp pstaabp merged commit 06e1712 into openwebwork:develop Mar 4, 2025
2 checks passed
@drgrice1 drgrice1 deleted the pg-codemirror-editor-update branch March 4, 2025 20:25
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.

3 participants