aklt / plantuml-syntax

vim syntax file for plantuml
Vim License
469 stars 72 forks source link

Colon labels should have spaces around them #93

Closed pappasam closed 3 years ago

pappasam commented 3 years ago

We were getting false matches before for ColonLine, mostly for class diagrams. This PR constrains the match for plantumlColonLine to only those colons with spaces on either side.

Check out the following example before and after in your editor:

@startuml
class Foo {
+ field1
+ field2
}

class Bar {
+ field3
+ field4
}

Foo::field1 --> Bar::field3 : foo
Foo::field2 --> Bar::field4 : bar
@enduml

Notice how the fields at the end are highlighted all weird? This PR fixes that problem.

Before

image

After

image

aklt commented 3 years ago

Thank you for adding this!

I have created #94 and hope to address it soon 👍