| 
			
			 | 
		#46 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Glad you got it working. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Thanks for picking up my support slack @jackie_w.  
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#47 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,269 
				Karma: 16544702 
				Join Date: Sep 2009 
				Location: UK 
				
				
				Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#48 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 877 
				Karma: 2676800 
				Join Date: Sep 2008 
				Location: Taranaki - NZ 
				
				
				Device: Kobo Aura H2O, Kobo Forma 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Hi DiapDealer 
		
	
		
		
		
		
		
		
		
		
		
		
	
	This looks to be an amazing plugin. Have you thought of making an addition to replace paragraphs formed using break tags to those using paragraph tags? Would this fit into the theme of the plugin? Would you be interested in implementing such a feature if it did fit? Example of what I mean: Code: 
	Turn this: ... This is a paragraph...<br /> <br /> This is another paragraph.<br /> <br /> ... Into this: <p>This is a paragraph...</p> <p>This is another paragraph.</p> Your thoughts?  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#49 | |
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 <p> is simple what if the first tag was a: <div class="foo"> <span class="bar"> or <p class="foo"> <span class="bar"> or the <br /> was inside another tag <i>there she<br /> blows</i> (up   )
		 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#50 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 First and foremost, I create tools that I need/want for my own use; and happily share them with others who may be looking for similar tools. But I'm afraid I long ago grew tired of trying to "fix" ebook code that was so bad its paragraphs weren't clearly delineated. Now I just discard that sort of soup and look (or wait) for something better with which to start. I still like to spend more time reading ebooks than I do working on them, after all. ![]() I think calibre's line unwrapping feature (part of its conversion options) does as admirable a job as any at this sort of thing, but there's always going to be some guessing and hoping (and proofing and reproofing) going on. Last edited by DiapDealer; 09-05-2015 at 08:42 AM.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#51 | |
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 877 
				Karma: 2676800 
				Join Date: Sep 2008 
				Location: Taranaki - NZ 
				
				
				Device: Kobo Aura H2O, Kobo Forma 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 ![]() I mainly come across this particular issue with some fanfiction (depends on the website) and webfiction (spacebattles, I'm looking at YOU).  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#52 | 
| 
			
			
			
			 Ex-Helpdesk Junkie 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421 
				Karma: 85400180 
				Join Date: Nov 2012 
				Location: The Beaten Path, USA, Roundworld, This Side of Infinity 
				
				
				Device: Kindle Touch fw5.3.7 (Wifi only) 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I assume you use the FanFicFare plugin? 
		
	
		
		
		
		
		
		
		
		
		
		
	
	... There may be something the plugin author can do, if it is a fairly consistent variety of source input. Best to ask about in the plugin thread, though. ![]() Always best to catch these things at the source, if possible.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#53 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 877 
				Karma: 2676800 
				Join Date: Sep 2008 
				Location: Taranaki - NZ 
				
				
				Device: Kobo Aura H2O, Kobo Forma 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Yeah, FanFicFare for the most part, although there are sometimes over places I've got online fic and it hasn't used proper paragraphing.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#54 | 
| 
			
			
			
			 Connoisseur 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82 
				Karma: 25684 
				Join Date: Sep 2014 
				
				
				
				Device: Kindle NT 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			First of all, thanks for this useful plugin! 
		
	
		
		
		
		
		
		
		
		
		
		
	
	If I add a cover using the Calibre Editor tool and then I apply Editing Toolbag to any tag, epub-check finds an error on the titlepage (the one with the cover): Code: 
	ERROR RSC-005 /text/titlepage.xhtml (line 16, col 53) Error while parsing file 'attribute "preserveaspectratio" not allowed here; expected attribute "alignment-baseline", [...].  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#55 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,269 
				Karma: 16544702 
				Join Date: Sep 2009 
				Location: UK 
				
				
				Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 In case it helps to track down the actual problem, I have seen it when trying to remove empty spans, even though there are no spans at all on a typical calibre svg-type cover page. I can work around the problem by running the Editor's Beautify option before running this plugin.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#56 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I'll have to take a look. I know that at one point, my code was taking extra care to preserve all the special camelCased svg attribute names, but perhaps I inadvertantly did something to break that. Should be pretty easy to fix if it is indeed my fault. It's weird that no one noticed until now, though, if so. This version has been in place for a long, long time now. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			EDIT: Looking at the code, it looks like an oversight on my part. Everything works fine if the svg attributes are cased properly to begin with, but not if they're already improperly cased in the source. @jackie_w: that explains why Beautifying before running the plugin resolves it. Should be a fairly easy fix. Last edited by DiapDealer; 06-13-2016 at 10:09 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#57 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,269 
				Karma: 16544702 
				Join Date: Sep 2009 
				Location: UK 
				
				
				Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 I believe the problem has something to do with the fact that the 'Add Cover' option creates Code: 
	preserveAspectRatio="..."> Code: 
	viewBox="..." Running Beautify before running the plugin removes the new lines. My best guess is that a defective preserveAspectRatio attribute results in a default being used and perhaps the default is to assume preserveAspectRatio="xMidYMid meet", which is what most people would have set it to anyway. I only noticed the problem because I'm one of the Philistines who prefers preserveAspectRatio="none" for my covers  
		 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#58 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Yes, being on a new line (after a linefeed character) could definitely trip up the plugin's tag/attribute-parsing routine. It's been a while since I've visited that. I'll have to experiment when I get in front of a PC. Thanks for investigating.  
		
	
		
		
		
		
		
		
		
		
		
		
	
	 
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#59 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			After examining this issue, I'm thinking the simplest approach to fix it is to just exempt svg tags from scrutiny entirely. Otherwise, even after fixing the case issue, the plugin's parser is always going to alter svg tags that have extra spacing (including linefeeds and or carriage returns between its attribute/value pairs. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	I can't imagine too many people are using this plugin to modify their svg wrappers to begin with. Thoughts?  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#60 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,269 
				Karma: 16544702 
				Join Date: Sep 2009 
				Location: UK 
				
				
				Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Obviously I can't speak for anyone else's usage, but I've never needed or wanted to 'refine' any SVG code with this plugin. I only use it for <div> and <span>.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Sample Plugin for the Editor | DiapDealer | Editor | 77 | 12-10-2014 08:16 AM | 
| Diaps Editing Toolbag.zip Index Error | phossler | Editor | 2 | 10-01-2014 09:05 PM | 
| Editor plugin question | DiapDealer | Development | 2 | 07-28-2014 11:23 PM | 
| japi - a text editor capable of editing ePub directly | hekkel | ePub | 5 | 02-20-2009 09:46 AM |