Commits

shl...@52c325ad-5fd0-0310-8a0f-c43feede02cc  committed 135230f

Moved up _handle_elem_of_name_b.

  • Participants
  • Parent commits aa8ce95

Comments (0)

Files changed (3)

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

     return;
 }
 
-sub _handle_elem_of_name_b
+sub _bold_tag_name
 {
-    my ($self, $elem) = @_;
-
-    $self->_output_tag_with_childs(
-        {
-            start => ["b"],
-            elem => $elem,
-        }
-    );
+    return "b";
 }
 
 sub _handle_elem_of_name_i

File perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/FictionBase/TagsTree2XML.pm

     return;
 }
 
+sub _handle_elem_of_name_b
+{
+    my ($self, $elem) = @_;
+
+    $self->_output_tag_with_childs(
+        {
+            start => [$self->_bold_tag_name()],
+            elem => $elem,
+        }
+    );
+}
+
 sub _handle_elem_of_name_br
 {
     my ($self, $elem) = @_;

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

     return $self->_handle_elem_of_name_s($elem);
 }
 
-# TODO : extract a common method with different class constants.
-sub _handle_elem_of_name_b
+sub _bold_tag_name
 {
-    my ($self, $elem) = @_;
-
-    $self->_output_tag_with_childs(
-        {
-            start => ["bold"],
-            elem => $elem,
-        }
-    );
-
-    return;
+    return "bold";
 }
 
 sub _write_elem