Jump to content


Pretty printed HTML import creates double spacing in user tool

  • Please log in to reply
No replies to this topic

#1 דָנִיאֶל



  • Super Member
  • PipPipPipPipPipPip
  • 4,661 posts
  • Gender:Male
  • Accordance Version:12.x
  • Platforms:Mac OS X, Windows, Android

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
     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.




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 Syntax Search For Wallace's Greek Grammar Beyond the Basics : https://github.com/4...WallaceInSyntax

Accordance Configurations :

Mac : 2009 27" iMac

Windows : MSI GE72 7RE Apache Pro laptop
Intel Core Duo Intel i7 Kabylake

Android : Samsung Note III 5.0, Samsung Tab S3 7.0 and Lenovo TAB4 8" 7.1

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users