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

[FEATURE] automatic replacement of \n by <br /> #19

Closed
pommedeterresautee opened this issue Jan 9, 2015 · 2 comments
Closed

[FEATURE] automatic replacement of \n by <br /> #19

pommedeterresautee opened this issue Jan 9, 2015 · 2 comments

Comments

@pommedeterresautee
Copy link
Contributor

People working on R have not to care to what tech is used to render their graph.
In a diagram you may have several lines, they will usually be separated by \n.
Unfortunately Mermaid doesn't care of \n but takes
into account.
May be it would be good to make this transformation by the R plugin.

Moreover I don't see any reason why someone would want to keep \n in the text of its diagram.

Best of all, it should take 1mn to implement the function.

@pommedeterresautee pommedeterresautee changed the title [FEATURE] automatic replacement of \n to <br /> [FEATURE] automatic replacement of \n by <br /> Jan 9, 2015
@timelyportfolio
Copy link
Contributor

Perhaps a reproducible example would clear up some of my confusion. Would that be possible? One concern I have is that labeling appears likely to change based on mermaid-js/mermaid#58.

@pommedeterresautee
Copy link
Contributor Author

I am thiking to something very simple like that:

> library(stringr)
> "toto\ntata" %>% str_replace_all("\n", "<br/>")
[1] "toto<br/>tata"

I do it for my own code.

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

3 participants