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

handle nested braces in alignment specification #996

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

Alex-Jordan
Copy link
Contributor

This fixes a bug with niceTables. Without this commit, if you specify an alignment string like *{3}{p{2in}} somewhere in a niceTables table, it will break. The regex treats this: {p{2in} as a matched brace pair with p{2in as the contents.

This commit changes the regex to balance the braces.

Try this example:

DOCUMENT();
loadMacros(qw(PGstandard.pl PGML.pl));
BEGIN_PGML
[# [. Cell .]  [. Cell .]  [. Cell .] #]*{align => '*{3}{p{2in}}'}
END_PGML
ENDDOCUMENT();

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impulsive approval!

@pstaabp pstaabp merged commit ebfc7e0 into openwebwork:develop Feb 7, 2024
2 checks passed
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