[PATCH 2 of 4] hgweb: close <p> elements
Mads Kiilerich
mads at kiilerich.com
Mon Jan 12 11:14:56 CST 2015
On 01/10/2015 02:41 PM, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <engored at ya.ru>
> # Date 1420883522 -28800
> # Sat Jan 10 17:52:02 2015 +0800
> # Node ID 27d20a4ed2e6d570b99a1f0b4a688fcb02e2659e
> # Parent febf58cfae9ec7f8a29ab785d145169998008d55
> hgweb: close <p> elements
>
> <p> elements can only contain inline elements, so as soon as browser encounters
> a block element (e.g. block <div>) "inside" a <p>, it puts an implicit </p>.
> It's better to do this explicitly.
This is obviously fixing a bug. But leaving an empty p also seems weird.
It is very un-semantic markup.
Would it break the rendering if it was removed? If so, shouldn't that be
addressed in CSS instead?
(This pattern seems to be repeated so often that a comment would be
un-DRY ...)
/Mads
>
> diff --git a/mercurial/templates/paper/bookmarks.tmpl b/mercurial/templates/paper/bookmarks.tmpl
> --- a/mercurial/templates/paper/bookmarks.tmpl
> +++ b/mercurial/templates/paper/bookmarks.tmpl
> @@ -23,7 +23,7 @@
> <ul>
> <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>
> </ul>
> -<p>
> +<p></p>
> <div class="atom-logo">
> <a href="{url|urlescape}atom-bookmarks" title="subscribe to atom feed">
> <img class="atom-logo" src="{staticurl|urlescape}feed-icon-14x14.png" alt="atom feed">
> diff --git a/mercurial/templates/paper/branches.tmpl b/mercurial/templates/paper/branches.tmpl
>
More information about the Mercurial-devel
mailing list