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

Empty commented line in inline comments leads to error #129

Open
jkraskesis opened this issue Apr 17, 2021 · 1 comment
Open

Empty commented line in inline comments leads to error #129

jkraskesis opened this issue Apr 17, 2021 · 1 comment

Comments

@jkraskesis
Copy link

Inserting an empty commented line in inline comments leads to error:
/**

  • @startuml
  • Alice->Bob : hello
  • Bob --> Alice : hello to you too
  • @enduml
    */
    leads to
    [From string (line 3) ]
    @startuml
    Alice->Bob : hello
    *
    ^^^^^
    Syntax Error?

It would be nice if this was permitted as many editors automatically insert a '*' when adding an extra line in a comment and "blank" lines are helpfull in structuring large inline plantuml cpmments

@hallvard
Copy link
Owner

hallvard commented Apr 18, 2021

The YAML support in PlantUML, forced med to handle whitespace differently, since YAML is whitespace-sensitive. Here I take the prefix before @startuml and remove it from the other lines if it's there. In this case the prefix is " * ", so a line with only " *" will not end up as the empty line, at least this is the intention. If the line really consists of " * " and not " *", my implementation must be faulty. I could also add logic for detecting the case where a trimmed prefix equals a trimmed line and remove that line.

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

No branches or pull requests

2 participants