![]() |
#1 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Differences between results in different modes
I have a metadata plugboard to put the comments plus some other information in the comments when sending books to my Kobo devices. Due to various reasons, I have different versions in different libraries. And whether the KoboTouch or KoboTouchExtended driver is used. While they are producing slightly different results, I also noticed that the treatment of new lines was different between the different template modes. For the basic template, the new lines are replaced with a space. With the GPM, they are not.
For example, if the comment is: Code:
<div> <p>Line one</p> <p>Line two</p></div> If the template is simply: Code:
{comment} Code:
<div> <p>Line one</p> <p>Line two</p></div> Code:
program: comment=field('comments'); Code:
<div> <p>Line one</p> <p>Line two</p></div> Should there be a difference between the two? As a workaround, I could do a replace of new lines with spaces. But, if there are new lines in the actual text, that could affect the output in undesirable ways. Is there any other way to push it through the formatting that the basic template does? |
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
There isn't any way to turn the old behavior back on for GPM templates. However, you can get the equivalent by doing re(x, '\s+', ' '), which will produce the same answer as before. BTW: only for the record as you clearly know it, the Kobo is getting it wrong. In HTML a newline is equivalent to a space (and to other characters). It can be made significant using the "white-space" style. |
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search results only show first result. How can I view successive results? | lovedj1 | Calibre | 2 | 05-07-2021 07:53 AM |
Refresh modes and app optimisation inconsistency | meccup | Onyx Boox | 0 | 07-05-2020 02:23 PM |
Forma Search-in-book results sometimes ends on page17, even if there's more (hidden)results | droopy | Kobo Reader | 9 | 06-30-2020 11:05 AM |
Diferences among various rendering modes | ps67 | KOReader | 2 | 08-14-2019 02:37 PM |
Kindle Previewer: Differences between Kindle and iPhone/iPad modes | Jackwritesbooks | Kindle Formats | 5 | 06-22-2011 12:25 PM |