Closed philCryoport closed 2 weeks ago
Hi @philCryoport,
From:
@startuml
!$poem = "Whose woods these are I think I know. \n His house is in the village though; \n He will not see me stopping here \n To watch his woods fill up with snow. "
node "$poem" as n
@enduml
Here is temporary workaround using \n\
with the line continuation \
, as:
@startuml
!$poem = "\
Whose woods these are I think I know. \n\
His house is in the village though; \n\
He will not see me stopping here \n\
To watch his woods fill up with snow."
node "$poem" as n
@enduml
:trollface: [Off topic] Even if (in python):
Enjoy, Regards, Th.
Hi @The-Lum I can work with \
as a line-continuation character.
Does the project team want to permanently preserve that workaround? Please let me know and I'll go find the online docs and submit a request to add this.
:trollface: [Off topic] Even if (in python):
* [reddit.com/r/learnpython/comments/mnubp4/is_it_bad_practice_to_use_backslash_line](https://www.reddit.com/r/learnpython/comments/mnubp4/is_it_bad_practice_to_use_backslash_line/)
Fascinating.
I've only coded a small amount of Python up until now (mostly PHP, Java, and SQL when I used to code full-time -- with a smattering of jQuery, ReactJS, Ruby, Scala, C, and bash scripting).
Does the project team want to permanently preserve that workaround?
No! :-)
Historically, the development and implementation of multiline management within PlantUML have proceeded without a comprehensive strategic framework or detailed specification. Changes and enhancements have been implemented in an ad hoc manner, based on immediate requirements and community feedback.
We have started a new specification document here http://alphadoc.plantuml.com/doc/markdown/en/spec-multiline Anyone can contribute (it's completely open, no password).
The idea is to get a proper idea of what we should do now about those \
and \n
. My personal opinion is that we should stop using it: I think it was a bad idea. However, we have to use something instead... but what exactly?
Feel free to write your ideas and suggestions!
We have started a new specification document here http://alphadoc.plantuml.com/doc/markdown/en/spec-multiline Anyone can contribute (it's completely open, no password).
😳
Might I suggest a different method -- perhaps with Markdown files in a Github repo -- so that changes are proposed, reviewed, then merged?
(just because I'm paranoid doesn't mean they're not out to get me / trash your alphadoc)
Maybe adopt a similar model to how OWASP does documentation?
Is your feature request related to a problem? Please describe. As of this writing, string-variable assignment is single-line text between two double-quote (
"
) characters. You want multi-line output? Insert new-line (\n
) characters.Makes it very difficult to read the code when it has multi-line strings...
Example:
Describe the solution you'd like Additionally allow the use of Heredoc / Nowdoc syntax with string-variable assignment.
Example:
Describe alternatives you've considered I'm not sure if there any alternatives...
Additional context N/A