Blanks in the first line before the first word in the code boxes

Started by Daniel Westermann (DWE)about 8 years ago18 messagesdocs
Jump to latest
#2Peter Eisentraut
peter_e@gmx.net
In reply to: Daniel Westermann (DWE) (#1)
Re: Blanks in the first line before the first word in the code boxes

On 3/23/18 08:56, Daniel Westermann wrote:

is it only me who sees blanks before the first word in the first line of
the code boxes, e.g. here:

https://www.postgresql.org/docs/9.6/static/sql-createtable.html
https://www.postgresql.org/docs/10/static/sql-createtable.html

For the devel documentation it is fine:
https://www.postgresql.org/docs/devel/static/sql-createtable.html

Tested in Firefox and Chrome.

Yeah, that looks weird. I'll look into it.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Peter Eisentraut (#2)
Re: Blanks in the first line before the first word in the code boxes

On 3/28/18 21:30, Peter Eisentraut wrote:

On 3/23/18 08:56, Daniel Westermann wrote:

is it only me who sees blanks before the first word in the first line of
the code boxes, e.g. here:

https://www.postgresql.org/docs/9.6/static/sql-createtable.html
https://www.postgresql.org/docs/10/static/sql-createtable.html

For the devel documentation it is fine:
https://www.postgresql.org/docs/devel/static/sql-createtable.html

Tested in Firefox and Chrome.

Yeah, that looks weird. I'll look into it.

Just looking at a nearby thread ... something is quite whacky with the
web site stylesheet. It didn't use to look like this. Check this out:
https://www.postgresql.org/docs/10/static/pgcrypto.html#id-1.11.7.35.5

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#4Jonathan S. Katz
jkatz@postgresql.org
In reply to: Peter Eisentraut (#3)
Re: Blanks in the first line before the first word in the code boxes

On Mar 28, 2018, at 9:32 PM, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:

On 3/28/18 21:30, Peter Eisentraut wrote:

On 3/23/18 08:56, Daniel Westermann wrote:

is it only me who sees blanks before the first word in the first line of
the code boxes, e.g. here:

https://www.postgresql.org/docs/9.6/static/sql-createtable.html
https://www.postgresql.org/docs/10/static/sql-createtable.html

For the devel documentation it is fine:
https://www.postgresql.org/docs/devel/static/sql-createtable.html

Tested in Firefox and Chrome.

Yeah, that looks weird. I'll look into it.

Just looking at a nearby thread ... something is quite whacky with the
web site stylesheet. It didn't use to look like this. Check this out:
https://www.postgresql.org/docs/10/static/pgcrypto.html#id-1.11.7.35.5 <https://www.postgresql.org/docs/10/static/pgcrypto.html#id-1.11.7.35.5&gt;

Something is adding spaces - it’s within the “<pre>” tag, which causes browsers
to interpret each space literally.

For the case of the “digest” function, the outputted HTML shows the first digest
function indented, the second one at the start of the new line.

Jonathan

#5Peter Eisentraut
peter_e@gmx.net
In reply to: Jonathan S. Katz (#4)
Re: Blanks in the first line before the first word in the code boxes

On 3/28/18 21:36, Jonathan S. Katz wrote:

On Mar 28, 2018, at 9:32 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com
<mailto:peter.eisentraut@2ndquadrant.com>> wrote:

Yeah, that looks weird.  I'll look into it.

Just looking at a nearby thread ... something is quite whacky with the
web site stylesheet.  It didn't use to look like this.  Check this out:
https://www.postgresql.org/docs/10/static/pgcrypto.html#id-1.11.7.35.5

Something is adding spaces - it’s within the “<pre>” tag, which causes
browsers
to interpret each space literally.

For the case of the “digest” function, the outputted HTML shows the
first digest
function indented, the second one at the start of the new line.

Yeah, the spaces are in the source, so it's not a CSS issue. But it
doesn't come out like that if you build the docs locally. So it's
something in the web site code.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#6Jonathan S. Katz
jkatz@postgresql.org
In reply to: Peter Eisentraut (#5)
Re: Blanks in the first line before the first word in the code boxes

On Mar 28, 2018, at 9:47 PM, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:

On 3/28/18 21:36, Jonathan S. Katz wrote:

On Mar 28, 2018, at 9:32 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com
<mailto:peter.eisentraut@2ndquadrant.com>> wrote:

Yeah, that looks weird. I'll look into it.

Just looking at a nearby thread ... something is quite whacky with the
web site stylesheet. It didn't use to look like this. Check this out:
https://www.postgresql.org/docs/10/static/pgcrypto.html#id-1.11.7.35.5

Something is adding spaces - it’s within the “<pre>” tag, which causes
browsers
to interpret each space literally.

For the case of the “digest” function, the outputted HTML shows the
first digest
function indented, the second one at the start of the new line.

Yeah, the spaces are in the source, so it's not a CSS issue. But it
doesn't come out like that if you build the docs locally. So it's
something in the web site code.

If I traced the code correctly, the line I suspect is such:

s = tidy.parseString(contents.encode('utf-8'), **tidyopts)

I know that the web infrastructure recently updated to the Django 1.11
series, I’m not sure if libtidy or the like were also updated with that. I’ll
defer to Magnus on that.

Jonathan

#7Magnus Hagander
magnus@hagander.net
In reply to: Jonathan S. Katz (#6)
Re: Blanks in the first line before the first word in the code boxes

On Thu, Mar 29, 2018 at 4:02 AM, Jonathan S. Katz <jkatz@postgresql.org>
wrote:

On Mar 28, 2018, at 9:47 PM, Peter Eisentraut <

peter.eisentraut@2ndquadrant.com> wrote:

On 3/28/18 21:36, Jonathan S. Katz wrote:

On Mar 28, 2018, at 9:32 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com
<mailto:peter.eisentraut@2ndquadrant.com>> wrote:

Yeah, that looks weird. I'll look into it.

Just looking at a nearby thread ... something is quite whacky with the
web site stylesheet. It didn't use to look like this. Check this out:
https://www.postgresql.org/docs/10/static/pgcrypto.html#id-1.11.7.35.5

Something is adding spaces - it’s within the “<pre>” tag, which causes
browsers
to interpret each space literally.

For the case of the “digest” function, the outputted HTML shows the
first digest
function indented, the second one at the start of the new line.

Yeah, the spaces are in the source, so it's not a CSS issue. But it
doesn't come out like that if you build the docs locally. So it's
something in the web site code.

If I traced the code correctly, the line I suspect is such:

s = tidy.parseString(contents.encode('utf-8'), **tidyopts)

I know that the web infrastructure recently updated to the Django 1.11
series, I’m not sure if libtidy or the like were also updated with that.
I’ll
defer to Magnus on that.

This would not change with the change to Django 1.11 -- the actual script
that loads the docs runs outside of Django.

Now, the entire machine was upgraded to a new Debian meaning new python,
new tidy etc some time ago. But this was done the first week of February.

Is it possible that this issue actually showed up around 4-5 February, but
just has gone unnoticed since?

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;

#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#7)
Re: Blanks in the first line before the first word in the code boxes

Magnus Hagander <magnus@hagander.net> writes:

Is it possible that this issue actually showed up around 4-5 February, but
just has gone unnoticed since?

It's been there a few weeks, anyway --- I remember somebody complaining
before this particular thread started. I wouldn't be a bit surprised
if it broke then.

regards, tom lane

#9David G. Johnston
david.g.johnston@gmail.com
In reply to: Tom Lane (#8)
Re: Blanks in the first line before the first word in the code boxes

On Thu, Mar 29, 2018 at 6:40 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Magnus Hagander <magnus@hagander.net> writes:

Is it possible that this issue actually showed up around 4-5 February,

but

just has gone unnoticed since?

It's been there a few weeks, anyway --- I remember somebody complaining
before this particular thread started. I wouldn't be a bit surprised
if it broke then.

​First report that both Tom and I responded to, Tom by cc'ing www, was on
the Feb 26th,

/messages/by-id/151965261562.21248.6807023085541361264@wrigleys.postgresql.org

David J.

#10Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#8)
Re: Blanks in the first line before the first word in the code boxes

On Thu, Mar 29, 2018 at 3:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Magnus Hagander <magnus@hagander.net> writes:

Is it possible that this issue actually showed up around 4-5 February,

but

just has gone unnoticed since?

It's been there a few weeks, anyway --- I remember somebody complaining
before this particular thread started. I wouldn't be a bit surprised
if it broke then.

Yeah, it's quite likely that it got broken by the OS upgrade and nobody
picked up on it before then. This can probably be because the backbranch
documentation is only updated when we make actual releases.

However, why does devel work fine when the others are broken. It's the
exact same code that's run to load the docs. The *input* to the loader must
also be different at some point.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;

#11Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#10)
Re: Blanks in the first line before the first word in the code boxes

Magnus Hagander <magnus@hagander.net> writes:

However, why does devel work fine when the others are broken. It's the
exact same code that's run to load the docs. The *input* to the loader must
also be different at some point.

HEAD is the only branch building the docs via XML, so it's hardly
unlikely that the input is different.

regards, tom lane

#12Peter Eisentraut
peter_e@gmx.net
In reply to: Magnus Hagander (#10)
Re: Blanks in the first line before the first word in the code boxes

On 4/1/18 11:55, Magnus Hagander wrote:

However, why does devel work fine when the others are broken. It's the
exact same code that's run to load the docs. The *input* to the loader
must also be different at some point.

In devel, the raw HTML output looks like

... <pre class="synopsis">
ALTER FOREIGN TABLE [ IF EXISTS ] [ ONLY ] ...

(with a line break)

but before it looks like

... <pre class="synopsis">ALTER FOREIGN TABLE [ IF EXISTS ] [ ONLY ] ...

(without a line break).

So maybe some part of the processing code thinks it should do some kind
of "indentation" here.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#13Magnus Hagander
magnus@hagander.net
In reply to: Peter Eisentraut (#12)
Re: Blanks in the first line before the first word in the code boxes

On Mon, Apr 2, 2018 at 5:59 PM, Peter Eisentraut <
peter.eisentraut@2ndquadrant.com> wrote:

On 4/1/18 11:55, Magnus Hagander wrote:

However, why does devel work fine when the others are broken. It's the
exact same code that's run to load the docs. The *input* to the loader
must also be different at some point.

In devel, the raw HTML output looks like

... <pre class="synopsis">
ALTER FOREIGN TABLE [ IF EXISTS ] [ ONLY ] ...

(with a line break)

but before it looks like

... <pre class="synopsis">ALTER FOREIGN TABLE [ IF EXISTS ] [ ONLY ] ...

(without a line break).

So maybe some part of the processing code thinks it should do some kind
of "indentation" here.

I think I found the problem, and pushed a fix for it. Basically it turns
off indentation completely on pre-11 versions., I elected to keep indention
on dev because it works there, and it makes debugging any of the formatting
a lot easier.

I've pushed the fix and reloaded the 10 docs. I have not reloaded earlier
branches yet, but I'd be interested in some people reviewing a bunch of
pages in the 10 docs mainly to see if (1) it fixes all the cases, and (2)
it actually breaks some *other* cases.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;

#14Peter Eisentraut
peter_e@gmx.net
In reply to: Magnus Hagander (#13)
Re: Blanks in the first line before the first word in the code boxes

On 4/3/18 09:12, Magnus Hagander wrote:

I've pushed the fix and reloaded the 10 docs. I have not reloaded
earlier branches yet, but I'd be interested in some people reviewing a
bunch of pages in the 10 docs mainly to see if (1) it fixes all the
cases, and (2) it actually breaks some *other* cases. 

It looks correct now.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#15Jonathan S. Katz
jkatz@postgresql.org
In reply to: Peter Eisentraut (#14)
Re: Blanks in the first line before the first word in the code boxes

On Apr 3, 2018, at 10:55 AM, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:

On 4/3/18 09:12, Magnus Hagander wrote:

I've pushed the fix and reloaded the 10 docs. I have not reloaded
earlier branches yet, but I'd be interested in some people reviewing a
bunch of pages in the 10 docs mainly to see if (1) it fixes all the
cases, and (2) it actually breaks some *other* cases.

It looks correct now.

+1

Did a spot check on known broken pages and chose some others at
random. Viewed the 9.6, 10, and devel versions. 10 and devel both
looked correct, and the 9.6 was broken where expected.

The only thing I saw (and this may be something to look at the SGML
source) was some blocks that looked overly indented, but it was consistent
across all versions. On

https://www.postgresql.org/docs/current/static/queries-with.html <https://www.postgresql.org/docs/current/static/queries-with.html&gt;

If you search for "WITH RECURSIVE search_graph(id, link, data, depth)”
the expression in the CTE is much more indented than similar CTEs above
it.

IMV I would not let this stop us from reloading the earlier versions as that
indentation is consistent across all versions (including 9.6, where it has the
initial indentation as well).

Jonathan

#16Magnus Hagander
magnus@hagander.net
In reply to: Jonathan S. Katz (#15)
Re: Blanks in the first line before the first word in the code boxes

On Wed, Apr 4, 2018 at 3:21 PM, Jonathan S. Katz <jkatz@postgresql.org>
wrote:

On Apr 3, 2018, at 10:55 AM, Peter Eisentraut <
peter.eisentraut@2ndquadrant.com> wrote:

On 4/3/18 09:12, Magnus Hagander wrote:

I've pushed the fix and reloaded the 10 docs. I have not reloaded
earlier branches yet, but I'd be interested in some people reviewing a
bunch of pages in the 10 docs mainly to see if (1) it fixes all the
cases, and (2) it actually breaks some *other* cases.

It looks correct now.

+1

Did a spot check on known broken pages and chose some others at
random. Viewed the 9.6, 10, and devel versions. 10 and devel both
looked correct, and the 9.6 was broken where expected.

The only thing I saw (and this may be something to look at the SGML
source) was some blocks that looked overly indented, but it was consistent
across all versions. On

https://www.postgresql.org/docs/current/static/queries-with.html

If you search for "WITH RECURSIVE search_graph(id, link, data, depth)”
the expression in the CTE is much more indented than similar CTEs above
it.

IMV I would not let this stop us from reloading the earlier versions as
that
indentation is consistent across all versions (including 9.6, where it has
the
initial indentation as well).

I've reloaded docs back to 9.3.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;

#17Peter Eisentraut
peter_e@gmx.net
In reply to: Jonathan S. Katz (#15)
Re: Blanks in the first line before the first word in the code boxes

On 4/4/18 09:21, Jonathan S. Katz wrote:

The only thing I saw (and this may be something to look at the SGML
source) was some blocks that looked overly indented, but it was consistent
across all versions.  On

https://www.postgresql.org/docs/current/static/queries-with.html

If you search for "WITH RECURSIVE search_graph(id, link, data, depth)”
the expression in the CTE is much more indented than similar CTEs above
it.

This was that way in the source. Probably originally 8-space tabs.
I've fixed it now.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#18Jonathan S. Katz
jkatz@postgresql.org
In reply to: Peter Eisentraut (#17)
Re: Blanks in the first line before the first word in the code boxes

On Apr 4, 2018, at 8:59 PM, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:

On 4/4/18 09:21, Jonathan S. Katz wrote:

The only thing I saw (and this may be something to look at the SGML
source) was some blocks that looked overly indented, but it was consistent
across all versions. On

https://www.postgresql.org/docs/current/static/queries-with.html

If you search for "WITH RECURSIVE search_graph(id, link, data, depth)”
the expression in the CTE is much more indented than similar CTEs above
it.

This was that way in the source. Probably originally 8-space tabs.

That was my hunch, but wanted to be triple-sure.

I've fixed it now.

Awesome. Thanks!

Jonathan