Display code With line break in WordPress (HTML side)
Hi
First, thanks a lot for you app. I use all the time.
In Marked preference I checked "Retain line breaks in
paragraph" and "Convert fenced code
blocks"
For code (PHP, HTML or CSS), I writte between ~~~
When I use Marked to display the md file, the code just show off
perfectly. But when I copy/paste the HTML
(rendering by Marked) in WordPress (HTML side) article, I loose all
the line break and tab.
Any idea?
Thanks
Grégoire
Comments are currently closed for this discussion. You can start a new one.
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
1 Posted by Gregoire on 02 Nov, 2012 12:56 PM
I stop using
~~~
and put<pre>
instead and use Byword to generate the HTML and it works perfectly.Brett, do you think that I can use Marked to have the same result.
Thanks
Support Staff 2 Posted by Brett on 02 Nov, 2012 01:14 PM
Standard Markdown syntax for code blocks is to indent the whole block
5 spaces. If you do that, it will display properly and you'll get pre
tags generated automatically.
3 Posted by Gregoire on 02 Nov, 2012 01:23 PM
Thanks Brett. It works now.
Strange for Byword. This soft don't need that.
It take more time to add the code block and space.
4 Posted by Gregoire on 02 Nov, 2012 01:45 PM
I made many test (with html, css, php). The easiest way is to use
<pre>
with Byword to export in HTML. All the line break and tab are respected.Support Staff 5 Posted by Brett on 02 Nov, 2012 02:09 PM
In Byword, just select the block and type ctrl-command-right arrow and it will indent. It will have the same effect in both Byword and Marked.
Gregoire closed this discussion on 02 Nov, 2012 02:10 PM.
Gregoire re-opened this discussion on 02 Nov, 2012 02:10 PM
6 Posted by Gregoire on 02 Nov, 2012 02:16 PM
thanks for the trick Brett. After many test. You're right, that's the easiest method with Byword. And after, it works perfectly in Marked.
Gregoire closed this discussion on 02 Nov, 2012 03:47 PM.
Gregoire re-opened this discussion on 03 Nov, 2012 06:16 PM
Gregoire closed this discussion on 03 Nov, 2012 06:19 PM.