![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Markdown / Blockquote conversion giving unexpected results
I am using blockquotes within some markdown text but getting unexpected results. Calibre's resultant html is different to that produced by the standard markdown processor, (see http://daringfireball.net/projects/markdown/dingus).
With sample source text of: ### Blockquote Test > This is a blockquote > section of markdown. > > Hardwrap with 2 trailing spaces. > Use for quotations/poetry etc. Markdown (Daring Fireball) produces: <h3>Blockquote Test</h3> <blockquote> <p>This is a blockquote <br /> section of markdown. </p> <p>Hardwrap with 2 trailing spaces. <br /> Use for quotations.</p> </blockquote> whereas calibre produces: <h3 class="calibre1">Blockquote Test</h3> <blockquote class="calibre2"><p class="calibre3">This is a blockquote > section of markdown. > > Hardwrap with 2 trailing spaces. > Use for quotations/poetry etc. </p> </blockquote> These differences obviously display quite diffently in a eBook. Can I get calibre to produce the standard output? I am using calibre 0.7.46 on Windows 7. In the TXT input conversion options I used Paragraph style: block and Formatting style: markdown. |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
In conversion settings, Txt-Input - set the Paragraph style to 'off'
that should do it |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
The available options are: auto, block, single, print, unformatted.
I tried unformatted and got: <blockquote class="calibre2"><p class="calibre3">This is a blockquote > section of markdown. </p> <p class="calibre3">Hardwrap with 2 trailing spaces. </p> <p class="calibre3">Use for quotations/poetry etc. </p> </blockquote> This is closer but still has a spurious > instead of a new line within the paragraph. I'll try all the other options and see what I get. |
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Single gives:
<blockquote class="calibre2"><p class="calibre3">This is a blockquote </p> <p class="calibre3">section of markdown. </p> <p class="calibre3">Hardwrap with 2 trailing spaces. </p> <p class="calibre3">Use for quotations/poetry etc. </p> </blockquote> but this is not strictly correct and will cause every line in my source to be treated as a paragraph, which is not how markdown works. (Print and Unformatted were even worse). |
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Are you sure you're using calibre 0.7.46, as there was a new setting, especially for markdown/Textile, which is 'off'
I'm also using Win7, and I have auto, block, single, print, unformatted and off. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Ah! my mistake, I'm still on 0.7.45. Thanks, I'll get updated and see what happens.
|
![]() |
![]() |
![]() |
#7 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,892
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
|
![]() |
![]() |
![]() |
#8 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Just done a test with your few lines, and there's a problem, the lines still get joined together.
I done a test with Textile styled text Code:
h3. Blockquote Test bq. This is a blockquote section of markdown. bq. Hardwrap with 2 trailing spaces. Use for quotations/poetry Code:
<h3 class="calibre1" id="calibre_pb_0">Blockquote Test</h3> <blockquote class="calibre2"> <p class="calibre3">This is a blockquote<br class="calibre4" /> section of markdown.</p> </blockquote> <blockquote class="calibre2"> <p class="calibre3">Hardwrap with 2 trailing spaces.<br class="calibre4" /> Use for quotations/poetry etc.</p> </blockquote> |
![]() |
![]() |
![]() |
#9 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Again with Textile (I prefer it to markdown - more options)
Code:
h3. Blockquote Test bq.. This is a blockquote section of markdown. Hardwrap with 2 trailing spaces. Use for quotations/poetry etc. Converts to Code:
<h3 class="calibre1" id="calibre_pb_0">Blockquote Test</h3> <blockquote class="calibre2"> <p class="calibre3">This is a blockquote<br class="calibre4" /> section of markdown.</p> <p class="calibre3">Hardwrap with 2 trailing spaces.<br class="calibre4" /> Use for quotations/poetry etc.</p> </blockquote> |
![]() |
![]() |
![]() |
#10 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
No matter what options I try with markdown text, the lines still get wrapped.
You should probably send a small note to user_none (who maintains that code) to check if the 'off' also applies to markdown, as it does with Textile. |
![]() |
![]() |
![]() |
#11 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Thanks Perkin, 0.7.46 has fixed it for me, with Paragraph style: Off I get:
<blockquote class="calibre2"><p class="calibre3">This is a blockquote<br class="calibre4"/> section of markdown. </p> <p class="calibre3">Hardwrap with 2 trailing spaces.<br class="calibre4"/> Use for quotations/poetry etc. </p> </blockquote> I haven't come across Textile but I will look it up. |
![]() |
![]() |
![]() |
#12 |
Sigil & calibre developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
I'll look into this issue either this or tomorrow evening.
|
![]() |
![]() |
![]() |
#13 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Agama says it works properly for him.
I found the lines got combined, unless I added a couple of spaces at end of those lines. They then worked properly, so with markdown, I can't remember if blockquote text needs the spaces on the end. (So it may be me) I just copy & pasted his example in his post, which didn't have any extra spaces, which may explain why it didn't work properly for me. (at least until I added them) |
![]() |
![]() |
![]() |
#14 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Just checked http://daringfireball.net/projects/m...tax#blockquote and the lines should not be combined.
So we may have other settings which may be causing our differences. |
![]() |
![]() |
![]() |
#15 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
So, I'm quite satisfied that calibre is performing exactly as required. (I've had a look at Textile and it looks very useful: not as readable as markdown, but more flexible as a pre-cursor to book conversion, so I think I'll make the switch). |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conversion from which format gives best results? | Valkrider | Conversion | 3 | 02-07-2011 07:20 AM |
Unutterably Silly Unexpected results of the pumpkin pie | kennyc | Lounge | 7 | 11-24-2010 12:14 PM |
Unexpected conversion | jusmee | Calibre | 4 | 11-05-2009 10:30 AM |
Calibre comic conversion yields poor results when target is epub; looks fine on LRF | acidzebra | Calibre | 2 | 08-17-2009 10:54 AM |
Please show off your PDF conversion results! | Staz | Sony Reader | 0 | 02-11-2009 03:44 AM |