Printing Code Blocks with Word Wrap
Hello,
Is there a way to print from Marked with word wrap enabled for words inside code blocks? Currently, I use the GitHub template 90% of the time.
Adam
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 26 Feb, 2019 03:30 PM
Do you have this option set?
2 Posted by Adam on 26 Feb, 2019 06:35 PM
Thanks for pointing that out and yes I do (see screenshot). It looks like it doesn't work on GitHub. Also, I'm using Markdown in a unique way for note taking with Sublime Text.
```
Test
```
(blank line)
```
Test
```
For the GitHub preview, it merges the two code blocks and ignores the blank line (see attachment).
Support Staff 3 Posted by Brett on 26 Feb, 2019 06:59 PM
Just for clarity, is it significant that you have 4 backticks at the end
of the first block, or just an error in typing it out here?
-Brett
Support Staff 4 Posted by Brett on 26 Feb, 2019 07:08 PM
So the "allow themes to wrap" option only offers the option to the theme. The GitHub theme does not wrap code by default (though it does in export). If you want to force wrapping in the preview, you can use the Preferences->Style->Additional CSS box to add:
I also included a margin in there to give you the space between blocks I think you're looking for.
-Brett
5 Posted by Adam on 03 Mar, 2019 05:36 PM
Thanks for taking the time to help me with this minor request. I'm not using four backticks in the code block example. Only three. I edited that post, so it may had a typo.
Where are your CSS Themes in the Library? I can't find them. I want to copy the GitHub theme and make a custom one with the code you provided.
Support Staff 6 Posted by Brett on 03 Mar, 2019 05:44 PM
You can download (mostly up-to-date) copies of the default CSS files at
https://github.com/ttscoff/MarkedCustomStyles/tree/master/default_styles
-Brett