Skip to content

Matrix property fix#102

Open
Gustaf-C wants to merge 3 commits intomathworks:masterfrom
Gustaf-C:matrix-property-fix
Open

Matrix property fix#102
Gustaf-C wants to merge 3 commits intomathworks:masterfrom
Gustaf-C:matrix-property-fix

Conversation

@Gustaf-C
Copy link

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
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
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
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.

Incorrect highlighting for matrices

2 participants