Skip to content

Matrix property fix#102

Merged
dklilley merged 6 commits intomathworks:masterfrom
Gustaf-C:matrix-property-fix
Mar 27, 2026
Merged

Matrix property fix#102
dklilley merged 6 commits intomathworks:masterfrom
Gustaf-C:matrix-property-fix

Conversation

@Gustaf-C
Copy link
Copy Markdown
Contributor

This fixes the incorrect highligting of matrices, shown below:

matrix property fixed

In essence it changes the validation to ignore a semicolon if it is enclosed in brackets.

As a small addition I added a print that tells you that all tests passed.

Closes #101

@dklilley
Copy link
Copy Markdown
Member

Hi @Gustaf-C , thank you for finding and working to resolve this issue!

<string>Handle things like arg = val; nextArg</string>
<key>match</key>
<string>(=[^;]*)</string>
<string>(=(?:[^\[;]+|\[[^\]]*\])*)</string>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this change looks good for handling this case!

I believe there is also an issue with cell arrays in the same scenario:

classdef Foo
    properties
        cellArr = {1 1; 2 2};
    end
end

Could you make a quick addition to include this case as well?

@dklilley dklilley self-assigned this Mar 24, 2026
@Gustaf-C
Copy link
Copy Markdown
Contributor Author

That should have fixed the issue for cell arrays as well

@Gustaf-C Gustaf-C requested a review from dklilley March 25, 2026 22:10
@nothans
Copy link
Copy Markdown
Member

nothans commented Mar 26, 2026

Hi. Thanks for the contribution! Can you reach out to me, and I will get a CLA signed so we can accept this PR. Cheers.

@nothans nothans added the CLA required Requires the signing of a Contributor License Agreement label Mar 26, 2026
@nothans nothans added CLA signed Indicates that the requester has signed the Contributor License Agreement and removed CLA required Requires the signing of a Contributor License Agreement labels Mar 26, 2026
@dklilley dklilley merged commit e292927 into mathworks:master Mar 27, 2026
2 checks passed
@Gustaf-C Gustaf-C deleted the matrix-property-fix branch March 27, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA signed Indicates that the requester has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect highlighting for matrices

3 participants