View Single Post
Old 07-16-2022, 05:45 PM   #5
slantybard
my parent's oops...
slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.
 
Posts: 492
Karma: 1477572
Join Date: Feb 2009
Device: Vx->Handera->Clie-> Axim->505->650->KPW/Aura ->L2->iOS/CBW
Ok, thanks so much for showing me that. I have run some tests on an empty test epub book that has "1000" Words in the #Words metadata and the Calibre workflow I have used is introducing <br> tags somehow. Can you look at what I'm doing and give your thoughts please and thanks:

Image 1: Empty epub test file with: 1000 words, no comments, test paragraphs in #blurb (no <br> tags) - I have attached it if someone wants to try this on their system

Image 2: Run S&R regex to copy "Words" count to the comment field:
Search field #wordcount
Code:
(\d+)
Replace append mode field comments
Code:
\1 Words
See Image 2 and the results of this S&R in Image 3
Notice that the results image does not have any <br> tags anywhere

Image 4: Run S&R regex to append the #blurb paragraphs to the comment field:
Search field #blurb
Code:
(.*)
or
Code:
^(.*)$
Replace append mode field comments
Code:
\1
See Image 4 and the results of this in Images 5 (normal view) and 6 (html view) where <br> tags have somehow been introduced???

If I do NOT run the 1st S&R regex copying the word count into the comments, <br> tags are not introduced by the 2nd regex copying the blurb

If I have an empty comments field OR have manually typed in the word count into the comments field first (ie again, not running the 1st regex) before running the 2nd regex, <br> tags are not introduced.

I guess my final question would be if this is a Calibre issue or QT5/6 issue?
Attached Thumbnails
Click image for larger version

Name:	Image 1.jpeg
Views:	59
Size:	166.4 KB
ID:	195059   Click image for larger version

Name:	Image 2.jpeg
Views:	63
Size:	398.7 KB
ID:	195060   Click image for larger version

Name:	Image 3.jpeg
Views:	48
Size:	201.5 KB
ID:	195061   Click image for larger version

Name:	Image 4.jpeg
Views:	58
Size:	457.2 KB
ID:	195062   Click image for larger version

Name:	Image 5.jpeg
Views:	60
Size:	273.0 KB
ID:	195063   Click image for larger version

Name:	Image 6.jpeg
Views:	54
Size:	252.5 KB
ID:	195064  
Attached Files
File Type: epub Test - test.epub (2.4 KB, 44 views)

Last edited by slantybard; 07-16-2022 at 05:58 PM.
slantybard is offline   Reply With Quote