[Bps-public-commit] HTML-Quoted branch master updated. 0.04-2-gcfc0447
BPS Git Server
git at git.bestpractical.com
Tue Jul 11 19:44:48 UTC 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "HTML-Quoted".
The branch, master has been updated
via cfc04479844845aa16ff9fae30c7a9052d644ff0 (commit)
via ebda0f9f442bdb745cc8bf2eb976f164aa235f58 (commit)
from 9bb6694d5fff00d645055264b4db51d44b23fe47 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cfc04479844845aa16ff9fae30c7a9052d644ff0
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jul 12 03:40:02 2023 +0800
Prep 0.05
diff --git a/Changes b/Changes
index f27b46d..1a82c14 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+0.05 2023-07-11
+
+ * Mark hr as an inline tag
+
0.04 Tue May 21 11:52:10 PDT 2013
* add combine_hunks method (RJBS)
diff --git a/lib/HTML/Quoted.pm b/lib/HTML/Quoted.pm
index d6c8492..efdee30 100644
--- a/lib/HTML/Quoted.pm
+++ b/lib/HTML/Quoted.pm
@@ -4,7 +4,7 @@ use warnings;
package HTML::Quoted;
-our $VERSION = '0.04';
+our $VERSION = '0.05';
=head1 NAME
commit ebda0f9f442bdb745cc8bf2eb976f164aa235f58
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jul 12 03:37:53 2023 +0800
Mark hr as an inline tag
The initial reason is RT-Extension-NonWatcherRecipients uses <hr>, and
quoted blocks were messed up without this change.
diff --git a/lib/HTML/Quoted.pm b/lib/HTML/Quoted.pm
index a9da67c..d6c8492 100644
--- a/lib/HTML/Quoted.pm
+++ b/lib/HTML/Quoted.pm
@@ -179,12 +179,13 @@ sub combine {
# XXX: p is treated as inline tag as it's groupping tag that
# can not contain blocks inside, use span for groupping
+# hr is treated as inline tag as it doesn't contain blocks inside
my %INLINE_TAG = map {$_ => 1 } qw(
a br span bdo map img
tt i b big small
em strong dfn code q
samp kbd var cite abbr acronym sub sup
- p
+ p hr
);
my %ENTITIES = (
diff --git a/t/blocks.t b/t/blocks.t
index 378920d..55eb1bb 100644
--- a/t/blocks.t
+++ b/t/blocks.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More tests => 7;
+use Test::More tests => 9;
BEGIN { use_ok('HTML::Quoted') };
sub rt_ok { # C&P also in t/lines.t
@@ -33,3 +33,10 @@ use Data::Dumper;
or diag Dumper(HTML::Quoted->extract($a));
rt_ok($a);
}
+
+{
+ my $a = "<div></div><hr>";
+ is_deeply(HTML::Quoted->extract($a),[{raw => '<div></div>', block => 1 },{raw => '<hr>'}])
+ or diag Dumper(HTML::Quoted->extract($a));
+ rt_ok($a);
+}
-----------------------------------------------------------------------
Summary of changes:
Changes | 4 ++++
lib/HTML/Quoted.pm | 5 +++--
t/blocks.t | 9 ++++++++-
3 files changed, 15 insertions(+), 3 deletions(-)
hooks/post-receive
--
HTML-Quoted
More information about the Bps-public-commit
mailing list