Jump to content


Photo

Pretty printed HTML import creates double spacing in user tool


  • Please log in to reply
No replies to this topic

#1 דָנִיאֶל

דָנִיאֶל

    Mithril

  • Active Members
  • PipPipPipPipPipPip
  • 3,603 posts
  • Gender:Male
  • Accordance Version:12.x
  • Platforms:Mac OS X, Windows

Posted 07 July 2014 - 11:21 PM

Hi ya,

 

  Mac 10.4.3 on OSX 10.9.3.

 

  Working on an import project I am preprocessing the HTML. When I pretty print the output HTML, ready for import, and import it I can get an additional space. I believe this is because the carriage return of the pretty printing is converted to a space, or perhaps that the CR is breaking up one sequence of whitespace into two. As an example take this fragment of HTML. I doubt the <i> tag is relevant and it is stripped in either case.

 

reprint of this <i>Introduction</i> would shortly

 

This text results in an import of :

 

reprint of this Introduction would shortly

 

all neatly single spaced.

 

This source fragment though :

 

reprint of this
     <i>
      Introduction
     </i>
     would shortly

 

results in this in the tool :

 

reprint of this  Introduction  would shortly

 

Note the pairs of spaces before and after the word Introduction.

 

It is possible for pretty printing to produce unintended spaces to appear in a broswer rendering also. In that case though as a carriage return is handled as being essentially the same as whitespace there is only one space for something like this. But that case will result in a space where none was intended not two where one was.

 

Tx

D


Edited by Daniel Semler, 07 July 2014 - 11:34 PM.

Sola lingua bona est lingua mortua

ἡ μόνη ἀγαθὴ γλῶσσα γλῶσσα νεκρὰ ἐστιν

lišanu ēdēnitu damqitu lišanu mītu

 

"Du stammst vom Herrn Adam und der Herrin Eva ab", sagte Aslan. "Und das ist zugleich Ehre genug, um das Häupt des ärmsten Bettlers zu erheben, und genug, um die Schultern des größten Kaisers auf Erden zu beugen. Sei zufrieden." Aslan, Die Chroniken von Narnia, Prinz Kaspian von Narnia. CS Lewis. Übersetzt von Wolfgang Holbein und Christian Rendel.

 

Accordance Configurations :
 
Mac : 2009 27" iMac                 Windows : HP 4540s laptop
      Intel Core Duo                          Intel i5 Ivy Bridge
      12GB RAM                                8GB RAM
      Accordance 11.2.4 and 12                Accordance 11.1.6 and 12
      OSX 10.11 (Yosemite)                    Win 10 Professional x64





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users