lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 4781b2b 2/6: Always prefer '<br>' to '<p></p>


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 4781b2b 2/6: Always prefer '<br>' to '<p></p>'
Date: Sun, 11 Aug 2019 10:10:53 -0400 (EDT)

branch: master
commit 4781b2b188189c78612241e67b4492b7064e88e6
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Always prefer '<br>' to '<p></p>'
    
    Now that empty paragraphs are suppressed, they must not be used to add
    white space. In this case, '<br><br><br>' has the same visual effect as
    the empty paragraph it has replaced. See:
      https://lists.nongnu.org/archive/html/lmi/2019-07/msg00007.html
    for a discussion that quotes:
      https://www.w3.org/TR/REC-html40/struct/text.html#edef-P
    | We discourage authors from using empty P elements.
    | User agents should ignore empty P elements.
    
    This was the only empty paragraph in '*.mst'. To find all, a command
    such as this might be used:
      grep -zo '< *[Pp] *>[[:space:]]*< *\/[Pp] *>' *.mst
    if newlines can occur only between '<>'-enclosed tags. It would be
    tedious to replace every ' ' in that command with '[[:space:]]', but a
    complete search can conveniently enough be done from the command line
    using vim:
      vim -p --cmd "vim '<\_s*[Pp]\_s*>\_s*<\_s*\/\_s*[Pp]\_s*>' *.mst"
    (Then type ':qa!' to exit vim.)
---
 ill_reg_header.mst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ill_reg_header.mst b/ill_reg_header.mst
index 858fa22..9682460 100644
--- a/ill_reg_header.mst
+++ b/ill_reg_header.mst
@@ -35,8 +35,9 @@
     <br>{{ProducerStreet}}
     <br>{{ProducerCityEtc}}
 </p>
-<p>
-</p>
+<br>
+<br>
+<br>
 <table width="100%" cellspacing="0" cellpadding="0" valign="top">
     <tr>
         <td width="60%">



reply via email to

[Prev in Thread] Current Thread [Next in Thread]