W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2017

Re: Preventing a line break?

From: Fred Bone <Fred.Bone@dial.pipex.com>
Date: Fri, 27 Oct 2017 17:46:04 +0100
To: html-tidy@w3.org
Message-ID: <59F362CC.2188.118CDFF6@Fred.Bone.dial.pipex.com>
On 26 October 2017 at 23:42, Harlan Stenn said:

> I'm running tidy 5.5.70, and when tidy sees a line like:
> 
> <p>Last update: <!-- #BeginDate format:En2m -->11-Sep-2010 05:53<!--
> #EndDate -->
> 
> (a single line) it turns it into:
> 
> <p>Last update: <!-- #BeginDate format:En2m -->11-Sep-2010 05:53
> <!-- #EndDate -->
> 
> which, ordinarily, is a perfectly fine thing to do.
> 
> The trick is, the script we have to auto-update the timestamp inside the:
> 
>  <!-- #BeginDate format:En2m -->11-Sep-2010 05:53<!-- #EndDate -->
> 
> section can't easily handle having the end tag be on a separate line.
> 
> Is there a way that I can tell tidy to avoid cleaning up this line?

Your problem seems to result from the length of the line. I suggest 
abbreviating the comments to bring the line length down to the point 
where Tidy won't insist on breaking it (and adjusting your script 
accordingly).
Received on Friday, 27 October 2017 16:47:13 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 16:47:20 UTC