Creole in class names not always working

0 votes
asked Jun 30, 2015 in Bug by Fuhrmanator (1,700 points)

The creole markup seems to conflict with some syntax in class names. For example, I was trying to specify the name of a REST resource as an object/class in monospace font, so I used ""monospace"" creole format.

In a class name, it gives a syntax error:

@startuml
class ""http://example.com/resource/001/""
class ""Test""
@enduml

Similarly, I was trying to do a class name on two lines, so normally you need a pair of " around the whole thing:

@startuml
class "REST resource\n""http://example.com/resource/001/"""
@enduml

I tried escaping with \ but that didn't change anything. I think there is a conflict with the way " is parsed.
 
Is there a monospace tag <pre></pre> or something as a workaround?
 
I also noticed that __underline__ doesn't work properly in class names either:

@startuml
class "__Test__"
@enduml

It doesn't cause an error, but the text isn't underlined (there appears to be some kind of graphic artifact at the start and end, however).

 

commented Jun 30, 2015 by Fuhrmanator (1,700 points)
Here's how other formats specify monospace: http://www.wikimatrix.org/syntax.php?i=26 Perhaps {{monospace}} is another way to consider?

1 Answer

+1 vote
answered Jul 1, 2015 by plantuml (295,000 points)
selected Jul 2, 2015 by Fuhrmanator
 
Best answer

Hi,

Thanks for the feedback.
We are indeed facing here several issues and bugs in the actual version.

Theorically, we should not use creole syntax for class name. For example, __Test__ is a valid class name (at least, in Java/C++/C#/Python...), so we should not underline in that situation.


So here is our proposition : creole parser will be used only when the "as" keyword will be used.

For example, if you use the following diagram with the last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

@startuml
class __Test__
class "__Test__" as foo2
class """http://example.com/resource/001/""" as foo3
class ""Test"" as foo4
class """Test""" as foo5
class "REST resource\n""http://example.com/resource/001/""" as foo6
@enduml


You will have the expected results. Note that the two first classes render differently.
We hope that the use of "as" is not an issue for you. If anyone has better idea, do not hesitate to post!

Thanks again,

...