Commits

shl...@52c325ad-5fd0-0310-8a0f-c43feede02cc  committed 753bcbc

Fixed _open_close_tag to accept an inner tag.

  • Participants
  • Parent commits b0b886e
  • Branches convert-to-Parser-MGC

Comments (0)

Files changed (1)

File perl/modules/XML-Grammar-Fiction/TEMP/new-Parser-MGC-XML-Fiction-parser.pl

 
     my $inner = $self->scope_of(
         undef, sub { 
-            return $self->any_of(
+            return $self->sequence_of(
                 sub {
-                    my (undef, $text) = $self->expect(qr/([^<]*)/ms);
+                    return $self->any_of(
+                        sub {
+                            my (undef, $text) = $self->expect(qr/([^<]+)/ms);
 
-                    return $self->_new_text([$text]);
-                },
-                sub {
-                    $self->_open_close_tag(),
+                            $self->commit;
+
+                            return $self->_new_text([$text]);
+                        },
+                        sub {
+                            $self->_open_close_tag(),
+                        },
+                    );
                 },
             );
         }, qr{</}