Commits

Anonymous committed 4d9c695

Extract a method in order to merge it.

Comments (0)

Files changed (1)

perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/Fiction/FromProto.pm

     return;
 }
 
+sub _handle_text_start
+{
+    my ($self, $elem) = @_;
+
+    $self->_output_tag_with_childs(
+        {
+            start => $self->_get_text_start($elem),
+            elem => $elem,
+        },
+    );
+
+    return;
+}
+
 sub _write_elem
 {
     my ($self, $args) = @_;
     }
     elsif ($elem->_short_isa("Text"))
     {
-        $self->_output_tag_with_childs(
-            {
-                start => $self->_get_text_start($elem),
-                elem => $elem,
-            },
-        );
+        $self->_handle_text_start($elem);
     }
     elsif ($elem->_short_isa("Comment"))
     {