New line with `\` not respected
See original GitHub issueHey 👋 ,
I noticed an interesting situation with line breaks. Take this example:
RUN bash -lc "rvm install ruby-2.5.1 && \
rvm use ruby-ruby-2.5.1 --default"
It renders as follows:
Adding a second \
to the code block as in this snippet renders as expected:
RUN bash -lc "rvm install ruby-2.5.1 && \\
rvm use ruby-ruby-2.5.1 --default"
I couldn’t find a related issue. Has anyone seen that and has a potential fix?
🙏
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Line break in HTML with '\n' - Stack Overflow
This is to show new line and return carriage in HTML, then you don't need to do it explicitly. You can do it...
Read more >Make A Block Of Text Respect A New Line - Today I Learned
The first rule, word-wrap: break-word , ensures that long lines of text uninterrupted by new lines respect the boundaries of our wrapping ...
Read more >Multiline block quotes does not respect new lines - GitLab
When using markdown I've noticed that block quotes both normal and multiline do not behave well with newlines.
Read more >Cat command does not respect new line - UNIX and Linux ...
The thread title is VERY misleading - cat WILL act correctly on newline chars! PLEASE make sure the thread title does reflect the...
Read more >white-space - CSS-Tricks
Interestingly, the final line break is not honored. As per the CSS 2.1 spec: “Lines are broken at preserved newline characters, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thought: Might this be caused by returning the code with the
@html
decorator from svelte?I came up with a potential fix, by returning the highlighted code with a
JSON.stringify
.Thats the sample repo for it
Thanks again for going way down the stack to help figure out what’s going on 🙏 . We are working towards a tight deadline to release the project. I’ll focus on launching the site next week, then come back to this issue with a link to the source code which will be open source.
The hint about
Dockerfile
vsdockerfile
was great, thank you! The project is a migration from Gatsby (via Sapper) to Svelte Kit and the Gatsby code highlighter plugin seemed fine with a capital D inDockerfile
. All good on that front now.