[Piglit] [PATCH 3/4] summary/html: ensure xml-line is the very first line

Dylan Baker dylan at pnwbakers.com
Mon Jan 28 21:48:36 UTC 2019


Quoting Erik Faye-Lund (2019-01-28 13:32:37)
> On Mon, 2019-01-28 at 10:57 -0800, Dylan Baker wrote:
> > Quoting Erik Faye-Lund (2019-01-21 08:00:56)
> > > Otherwise, GNOME Web (Epiphany) refuse to render the result.
> > > 
> > > Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
> > > ---
> > >  templates/feature.mako | 3 ++-
> > >  templates/index.mako   | 3 ++-
> > >  2 files changed, 4 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/templates/feature.mako b/templates/feature.mako
> > > index 9abd5bc31..7d2c400d9 100644
> > > --- a/templates/feature.mako
> > > +++ b/templates/feature.mako
> > > @@ -1,3 +1,5 @@
> > > +<?xml version="1.0" encoding="UTF-8"?>
> > > +
> > >  <%!
> > 
> > in mako nothing can come before the <%! value, this needs to be
> > first.
> > 
> 
> What do you mean? It works fine for me... Is it documented somewhere
> that this isn't supposed to work?
> 
> In fact, the documentation[1] says:
> 
> "Any number of <%! %> blocks can be declared anywhere in a template;
> they will be rendered in the resulting module in a single contiguous
> block above all render callables, in the order in which they appear in
> the source template."
> 
> This means that this is allowed as far as I can tell...
> 
> [1]: 
> https://docs.makotemplates.org/en/latest/syntax.html#module-level-blocks
> 

That is changed behavior then, at one point <%! %> had to be the first
non-comment, non-whitespace in the template. As long as it works, I guess it
doesn't matter too much.

Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20190128/84364350/attachment.sig>


More information about the Piglit mailing list