06-14-2011, 07:53 AM | #1 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Markdown Query : Using Emphasis
Should Markdown emphasis be detected when applied within quotes?
With the following text: Code:
_emphasis not in quotes_ "_emphasis in quotes_" Update: I have just tested on the Markdown website and <em> is triggered whether inside or outside of quotes, so it seems to be a calibre difference. Last edited by Agama; 06-14-2011 at 10:08 AM. Reason: Update |
06-14-2011, 11:19 AM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre uses a rather old python library to convert markdown, it's quite possible there are bugs in it. Updating to a newer library would mean re-writing all the ebook specific markup parts, which is not something I have the motivation to do at the moment.
|
Advert | |
|
06-14-2011, 12:03 PM | #3 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Enhancing Markdown input and output are high on my todo list. I will probably have time to start on it this weekend.
|
06-15-2011, 01:50 AM | #4 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Thanks. I can work around it for now with a post-conversion tweak.
Last edited by Agama; 07-20-2011 at 01:27 PM. |
07-20-2011, 01:27 PM | #5 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Update: I found a simple workaround. Use the alternate syntax, asterisks instead of underscores.
"*emphasis in quotes*" It would still be nice to get this fixed sometime, but it's not urgent. |
Advert | |
|
09-12-2011, 01:29 PM | #6 | |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
Sorry it's a forum posting rather than a PM but I couldn't work out how to attach the file to a PM. |
|
09-12-2011, 01:31 PM | #7 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
I'll look into it.
|
09-18-2011, 06:56 PM | #8 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
The issue it was running into is the input parser is unable to tell the difference between "_test_" and this_or_that. It's hard to tell (nearly impossible) if the _ in a word should be kept or converted to a style. I've changed the input parser to always convert sets of _ to styles. If you want to keep mid word _'s they will need be be escaped as \_.
|
09-19-2011, 01:46 AM | #9 |
Wizard
Posts: 1,759
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
Does calibre process textz and txt files differently. I had a problem recently where with the textz file marking was not detected correctly where as using the txt file worked.
Sadly I was converting for someone so I deleted the files once I sent them to her. I will try to find something like it again and post. |
09-19-2011, 07:39 AM | #10 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
@Dopedangel, It processes TXT and TXTZ the same. Most likely what you're seeing is a failure to auto detect the formatting and structure of the file. In some cases you need to manually set these.
|
09-20-2011, 03:12 PM | #11 | |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
(I would expect this_or_that to convert to this<em>or</em>that during Markdown processing, because the underscores are not escaped.) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HTML/CSS for (German) s p a c e d o u t emphasis | frabjous | Workshop | 21 | 05-16-2011 04:52 PM |
->Txt+Markdown | Perkin | Calibre | 2 | 12-11-2010 04:04 AM |
Emphasis or Italic for Language | ghostyjack | Workshop | 3 | 11-02-2010 10:46 AM |
Calibre loses all forms of Emphasis | spa | Calibre | 8 | 11-01-2010 06:06 AM |
Emphasis Line and Emphasis Dot | mcortez | Sony Reader | 6 | 01-19-2008 07:19 PM |