Author: Tim Düsterhus (TimWolla)
Committer: Derick Rethans (derickr)
Date: 2026-10-06T11:58:59+01:00

Commit: 
https://github.com/php/web-news/commit/e083f35e764bff5ea0fbcfd162b27ce1b7d9a0d2
Raw diff: 
https://github.com/php/web-news/commit/e083f35e764bff5ea0fbcfd162b27ce1b7d9a0d2.diff

Use proper `<blockquote>` for quoted parts in `format=flowed` rendering

A `<blockquote>` is more semantically correct than a plain `<div>`.

Changed paths:
  M  article.php
  M  style.css


Diff:

diff --git a/article.php b/article.php
index 4b133f0..902d02b 100644
--- a/article.php
+++ b/article.php
@@ -254,7 +254,7 @@
         # If this line had more quoting, go ahead and open to that level
         if ($new_level && $new_level > $level) {
             foreach (range($level + 1, $new_level) as $this_level) {
-                echo "<div class=\"quote quote{$this_level}\">";
+                echo "<blockquote class=\"quote quote{$this_level}\">";
             }
             $level = $new_level;
             $in_flow = true;
@@ -262,7 +262,7 @@
         # Otherwise if we are in a flow, but this line's level is lower (but
         # not 0), we need to close up the higher levels
         elseif ($in_flow && $new_level && $new_level < $level) {
-            echo str_repeat('</div>', $level - $new_level);
+            echo str_repeat('</blockquote>', $level - $new_level);
             $level = $new_level;
         }
 
@@ -304,7 +304,7 @@
                     echo '</pre>';
                     $in_code_block = false;
                 }
-                echo str_repeat("</div>", $level) . "\n";
+                echo str_repeat("</blockquote>", $level) . "\n";
                 $level = 0;
                 $in_flow = false;
             } else {
diff --git a/style.css b/style.css
index cdec4c5..4db6602 100644
--- a/style.css
+++ b/style.css
@@ -386,7 +386,7 @@ pre.flowed pre {
     margin: 0;
 }
 
-div.quote {
+blockquote.quote {
     border-left: 2px solid #777;
     padding: 0;
     padding-left: 1em;

Reply via email to