Closed heartacker closed 2 years ago
hi,anybody could fix this?
The syntax is expecting a space before the colon. Adding this space will allow the highlighting to continue working on the rest of the diagram. However, there is a bug with the backslash character not being treated as part of the note, hence the rest of the line still failing syntax highlighting. I'll work on a fix for this:
note left of github_gitlab : 最常见\n 的方式
Additionally, you'll see more syntax highlighting work by adding spacing around the arrows/curly brackets:
stateDiagram-v2
state github_gitlab {
Local0 --> git_Server:push
git_Server --> Local0:pull
}
note left of github_gitlab : 最常见\n 的方式
state gerrit {
gerrit_server --> git_server:commit
Local1 --> gerrit_server:push with review
git_server --> Local1:pull/sync
}
The reason for the spacing around the arrows is so that the dash characters can be used in the entities on either side of them - it is essentially a tradeoff between using a space or dash character in the entities.
This will go out with the next release (1.4.2). With the fix I'm seeing the diagram highlight properly: