stepmod-utils 0.6.7 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.rubocop.yml +1 -1
 - data/Gemfile +6 -3
 - data/exe/stepmod-convert-express-description +1 -1
 - data/exe/stepmod-convert-express-resource +1 -1
 - data/lib/stepmod/utils/cleaner.rb +31 -2
 - data/lib/stepmod/utils/concept.rb +33 -17
 - data/lib/stepmod/utils/converters/a.rb +2 -2
 - data/lib/stepmod/utils/converters/arm.rb +2 -2
 - data/lib/stepmod/utils/converters/base.rb +3 -23
 - data/lib/stepmod/utils/converters/clause_ref.rb +2 -2
 - data/lib/stepmod/utils/converters/comment.rb +2 -2
 - data/lib/stepmod/utils/converters/dd.rb +2 -2
 - data/lib/stepmod/utils/converters/def.rb +3 -3
 - data/lib/stepmod/utils/converters/definition.rb +2 -2
 - data/lib/stepmod/utils/converters/description.rb +2 -2
 - data/lib/stepmod/utils/converters/dl.rb +2 -2
 - data/lib/stepmod/utils/converters/dt.rb +2 -2
 - data/lib/stepmod/utils/converters/em.rb +3 -3
 - data/lib/stepmod/utils/converters/em_express_description.rb +5 -3
 - data/lib/stepmod/utils/converters/eqn.rb +3 -3
 - data/lib/stepmod/utils/converters/example.rb +2 -2
 - data/lib/stepmod/utils/converters/express_example.rb +0 -2
 - data/lib/stepmod/utils/converters/express_figure.rb +3 -2
 - data/lib/stepmod/utils/converters/express_g.rb +3 -3
 - data/lib/stepmod/utils/converters/express_note.rb +2 -2
 - data/lib/stepmod/utils/converters/express_ref.rb +2 -2
 - data/lib/stepmod/utils/converters/express_ref_express_description.rb +3 -3
 - data/lib/stepmod/utils/converters/express_table.rb +1 -2
 - data/lib/stepmod/utils/converters/ext_description.rb +3 -2
 - data/lib/stepmod/utils/converters/ext_descriptions.rb +3 -2
 - data/lib/stepmod/utils/converters/figure.rb +10 -5
 - data/lib/stepmod/utils/converters/fund_cons.rb +2 -2
 - data/lib/stepmod/utils/converters/introduction.rb +2 -2
 - data/lib/stepmod/utils/converters/li.rb +20 -0
 - data/lib/stepmod/utils/converters/module_ref.rb +2 -2
 - data/lib/stepmod/utils/converters/module_ref_express_description.rb +3 -3
 - data/lib/stepmod/utils/converters/note.rb +2 -2
 - data/lib/stepmod/utils/converters/ol.rb +9 -42
 - data/lib/stepmod/utils/converters/pass_through.rb +1 -1
 - data/lib/stepmod/utils/converters/resource.rb +2 -2
 - data/lib/stepmod/utils/converters/schema.rb +2 -2
 - data/lib/stepmod/utils/converters/schema_diag.rb +2 -2
 - data/lib/stepmod/utils/converters/stepmod_ext_description.rb +3 -3
 - data/lib/stepmod/utils/converters/strong.rb +3 -3
 - data/lib/stepmod/utils/converters/sub.rb +9 -7
 - data/lib/stepmod/utils/converters/sup.rb +9 -7
 - data/lib/stepmod/utils/converters/synonym.rb +2 -2
 - data/lib/stepmod/utils/converters/table.rb +3 -3
 - data/lib/stepmod/utils/converters/term.rb +2 -2
 - data/lib/stepmod/utils/converters/text.rb +3 -16
 - data/lib/stepmod/utils/converters/tr.rb +17 -0
 - data/lib/stepmod/utils/smrl_description_converter.rb +5 -13
 - data/lib/stepmod/utils/smrl_resource_converter.rb +12 -20
 - data/lib/stepmod/utils/stepmod_definition_converter.rb +19 -22
 - data/lib/stepmod/utils/stepmod_file_annotator.rb +11 -11
 - data/lib/stepmod/utils/term.rb +36 -14
 - data/lib/stepmod/utils/terms_extractor.rb +17 -13
 - data/lib/stepmod/utils/version.rb +1 -1
 - data/stepmod-utils.gemspec +14 -17
 - metadata +23 -75
 - data/lib/stepmod/utils/converters/blockquote.rb +0 -20
 - data/lib/stepmod/utils/converters/br.rb +0 -15
 - data/lib/stepmod/utils/converters/bypass.rb +0 -81
 - data/lib/stepmod/utils/converters/code.rb +0 -19
 - data/lib/stepmod/utils/converters/drop.rb +0 -22
 - data/lib/stepmod/utils/converters/head.rb +0 -23
 - data/lib/stepmod/utils/converters/hr.rb +0 -15
 - data/lib/stepmod/utils/converters/ignore.rb +0 -16
 - data/lib/stepmod/utils/converters/p.rb +0 -21
 - data/lib/stepmod/utils/converters/q.rb +0 -16
 - data/lib/stepmod/utils/converters/stem.rb +0 -19
 - data/lib/stepmod/utils/converters/uof.rb +0 -25
 
| 
         @@ -4,11 +4,12 @@ module Stepmod 
     | 
|
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class ExtDescriptions < Stepmod::Utils::Converters::Base
         
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       8 
8 
     | 
    
         
             
                      treat_children(node, state)
         
     | 
| 
       9 
9 
     | 
    
         
             
                    end
         
     | 
| 
       10 
10 
     | 
    
         
             
                  end
         
     | 
| 
       11 
     | 
    
         
            -
                   
     | 
| 
      
 11 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :ext_descriptions,
         
     | 
| 
      
 12 
     | 
    
         
            +
                                                            ExtDescriptions.new
         
     | 
| 
       12 
13 
     | 
    
         
             
                end
         
     | 
| 
       13 
14 
     | 
    
         
             
              end
         
     | 
| 
       14 
15 
     | 
    
         
             
            end
         
     | 
| 
         @@ -1,11 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            require " 
     | 
| 
      
 3 
     | 
    
         
            +
            require "coradoc/input/html/converters/figure"
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            module Stepmod
         
     | 
| 
       6 
6 
     | 
    
         
             
              module Utils
         
     | 
| 
       7 
7 
     | 
    
         
             
                module Converters
         
     | 
| 
       8 
     | 
    
         
            -
                  class Figure <  
     | 
| 
      
 8 
     | 
    
         
            +
                  class Figure < Coradoc::Input::Html::Converters::Figure
         
     | 
| 
       9 
9 
     | 
    
         
             
                    def self.pattern(state, id)
         
     | 
| 
       10 
10 
     | 
    
         
             
                      if state[:schema_and_entity].nil?
         
     | 
| 
       11 
11 
     | 
    
         
             
                        raise StandardError.new("[figure]: no state given, #{id}")
         
     | 
| 
         @@ -15,7 +15,7 @@ module Stepmod 
     | 
|
| 
       15 
15 
     | 
    
         
             
                      "figure-#{schema}-#{id}"
         
     | 
| 
       16 
16 
     | 
    
         
             
                    end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
                    def  
     | 
| 
      
 18 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       19 
19 
     | 
    
         
             
                      # If we want to skip this node
         
     | 
| 
       20 
20 
     | 
    
         
             
                      return "" if state[:no_notes_examples]
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
         @@ -26,7 +26,12 @@ module Stepmod 
     | 
|
| 
       26 
26 
     | 
    
         
             
                                     self.class.pattern(state, node["number"])
         
     | 
| 
       27 
27 
     | 
    
         
             
                                   end
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
                      super(node, state)
         
     | 
| 
      
 29 
     | 
    
         
            +
                      result = super(node, state)
         
     | 
| 
      
 30 
     | 
    
         
            +
                      id = result.id
         
     | 
| 
      
 31 
     | 
    
         
            +
                      anchor = "[[#{id}]]\n" if id
         
     | 
| 
      
 32 
     | 
    
         
            +
                      padding = "\n====\n"
         
     | 
| 
      
 33 
     | 
    
         
            +
                      child_content = treat_children(node, state).strip
         
     | 
| 
      
 34 
     | 
    
         
            +
                      "\n\n#{anchor}.#{result.title}#{padding}#{child_content}#{padding}"
         
     | 
| 
       30 
35 
     | 
    
         
             
                    end
         
     | 
| 
       31 
36 
     | 
    
         | 
| 
       32 
37 
     | 
    
         
             
                    def extract_title(node)
         
     | 
| 
         @@ -38,7 +43,7 @@ module Stepmod 
     | 
|
| 
       38 
43 
     | 
    
         
             
                  end
         
     | 
| 
       39 
44 
     | 
    
         | 
| 
       40 
45 
     | 
    
         
             
                  # This replaces the converter
         
     | 
| 
       41 
     | 
    
         
            -
                   
     | 
| 
      
 46 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :figure, Figure.new
         
     | 
| 
       42 
47 
     | 
    
         
             
                end
         
     | 
| 
       43 
48 
     | 
    
         
             
              end
         
     | 
| 
       44 
49 
     | 
    
         
             
            end
         
     | 
| 
         @@ -4,7 +4,7 @@ module Stepmod 
     | 
|
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class FundCons < Stepmod::Utils::Converters::Base
         
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       8 
8 
     | 
    
         
             
                      <<~TEXT
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                        *)
         
     | 
| 
         @@ -15,7 +15,7 @@ module Stepmod 
     | 
|
| 
       15 
15 
     | 
    
         
             
                    end
         
     | 
| 
       16 
16 
     | 
    
         
             
                  end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
                   
     | 
| 
      
 18 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :fund_cons, FundCons.new
         
     | 
| 
       19 
19 
     | 
    
         
             
                end
         
     | 
| 
       20 
20 
     | 
    
         
             
              end
         
     | 
| 
       21 
21 
     | 
    
         
             
            end
         
     | 
| 
         @@ -4,12 +4,12 @@ module Stepmod 
     | 
|
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class Introduction < Stepmod::Utils::Converters::Base
         
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       8 
8 
     | 
    
         
             
                      treat_children(node, state)
         
     | 
| 
       9 
9 
     | 
    
         
             
                    end
         
     | 
| 
       10 
10 
     | 
    
         
             
                  end
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                   
     | 
| 
      
 12 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :introduction, Introduction.new
         
     | 
| 
       13 
13 
     | 
    
         
             
                end
         
     | 
| 
       14 
14 
     | 
    
         
             
              end
         
     | 
| 
       15 
15 
     | 
    
         
             
            end
         
     | 
| 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Stepmod
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Utils
         
     | 
| 
      
 5 
     | 
    
         
            +
                module Converters
         
     | 
| 
      
 6 
     | 
    
         
            +
                  class Li < Coradoc::Input::Html::Converters::Li
         
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
      
 8 
     | 
    
         
            +
                      li = super
         
     | 
| 
      
 9 
     | 
    
         
            +
                      li.content = li.content.map do |content|
         
     | 
| 
      
 10 
     | 
    
         
            +
                        parsed_content = Coradoc::Generator.gen_adoc(content)
         
     | 
| 
      
 11 
     | 
    
         
            +
                        parsed_content[0] == " " ? parsed_content : parsed_content.lstrip
         
     | 
| 
      
 12 
     | 
    
         
            +
                      end
         
     | 
| 
      
 13 
     | 
    
         
            +
                      li
         
     | 
| 
      
 14 
     | 
    
         
            +
                    end
         
     | 
| 
      
 15 
     | 
    
         
            +
                  end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :li, Li.new
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -4,7 +4,7 @@ module Stepmod 
     | 
|
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class ModuleRef < Stepmod::Utils::Converters::Base
         
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, _state = {})
         
     | 
| 
       8 
8 
     | 
    
         
             
                      link_end = node["linkend"].to_s.split(":")
         
     | 
| 
       9 
9 
     | 
    
         
             
                      ref_id = link_end.last
         
     | 
| 
       10 
10 
     | 
    
         
             
                      text = node.text.gsub(/\s/, " ").squeeze(" ").strip
         
     | 
| 
         @@ -86,7 +86,7 @@ module Stepmod 
     | 
|
| 
       86 
86 
     | 
    
         
             
                      /.*?\s*\(?\d+\)?/.match(text)
         
     | 
| 
       87 
87 
     | 
    
         
             
                    end
         
     | 
| 
       88 
88 
     | 
    
         
             
                  end
         
     | 
| 
       89 
     | 
    
         
            -
                   
     | 
| 
      
 89 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :module_ref, ModuleRef.new
         
     | 
| 
       90 
90 
     | 
    
         
             
                end
         
     | 
| 
       91 
91 
     | 
    
         
             
              end
         
     | 
| 
       92 
92 
     | 
    
         
             
            end
         
     | 
| 
         @@ -5,7 +5,7 @@ module Stepmod 
     | 
|
| 
       5 
5 
     | 
    
         
             
              module Utils
         
     | 
| 
       6 
6 
     | 
    
         
             
                module Converters
         
     | 
| 
       7 
7 
     | 
    
         
             
                  class ModuleRefExpressDescription < Stepmod::Utils::Converters::Base
         
     | 
| 
       8 
     | 
    
         
            -
                    def  
     | 
| 
      
 8 
     | 
    
         
            +
                    def to_coradoc(node, _state = {})
         
     | 
| 
       9 
9 
     | 
    
         
             
                      link_end = node["linkend"].to_s.split(":")
         
     | 
| 
       10 
10 
     | 
    
         
             
                      text = node.text.gsub(/\s/, " ").squeeze(" ").strip
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
         @@ -45,8 +45,8 @@ module Stepmod 
     | 
|
| 
       45 
45 
     | 
    
         
             
                      # puts "[module_ref] #{result}"
         
     | 
| 
       46 
46 
     | 
    
         
             
                    end
         
     | 
| 
       47 
47 
     | 
    
         
             
                  end
         
     | 
| 
       48 
     | 
    
         
            -
                   
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
      
 48 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :module_ref,
         
     | 
| 
      
 49 
     | 
    
         
            +
                                                            ModuleRefExpressDescription.new
         
     | 
| 
       50 
50 
     | 
    
         
             
                end
         
     | 
| 
       51 
51 
     | 
    
         
             
              end
         
     | 
| 
       52 
52 
     | 
    
         
             
            end
         
     | 
| 
         @@ -4,7 +4,7 @@ module Stepmod 
     | 
|
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class Note < Stepmod::Utils::Converters::Base
         
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       8 
8 
     | 
    
         
             
                      # If we want to skip this node
         
     | 
| 
       9 
9 
     | 
    
         
             
                      return "" if state[:no_notes_examples]
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
         @@ -19,7 +19,7 @@ module Stepmod 
     | 
|
| 
       19 
19 
     | 
    
         
             
                      TEMPLATE
         
     | 
| 
       20 
20 
     | 
    
         
             
                    end
         
     | 
| 
       21 
21 
     | 
    
         
             
                  end
         
     | 
| 
       22 
     | 
    
         
            -
                   
     | 
| 
      
 22 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :note, Note.new
         
     | 
| 
       23 
23 
     | 
    
         
             
                end
         
     | 
| 
       24 
24 
     | 
    
         
             
              end
         
     | 
| 
       25 
25 
     | 
    
         
             
            end
         
     | 
| 
         @@ -3,53 +3,20 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            module Stepmod
         
     | 
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
     | 
    
         
            -
                  class Ol <  
     | 
| 
       7 
     | 
    
         
            -
                     
     | 
| 
       8 
     | 
    
         
            -
                      id = node["id"]
         
     | 
| 
       9 
     | 
    
         
            -
                      anchor = id ? "[[#{id}]]\n" : ""
         
     | 
| 
       10 
     | 
    
         
            -
                      ol_count = state.fetch(:ol_count, 0) + 1
         
     | 
| 
       11 
     | 
    
         
            -
                      attrs = ol_attrs(node)
         
     | 
| 
       12 
     | 
    
         
            -
                      children_s = treat_children(node, state.merge(
         
     | 
| 
       13 
     | 
    
         
            -
                                                          ol_count: ol_count,
         
     | 
| 
       14 
     | 
    
         
            -
                                                          tdsinglepara: true,
         
     | 
| 
       15 
     | 
    
         
            -
                                                        ))
         
     | 
| 
      
 6 
     | 
    
         
            +
                  class Ol < Coradoc::Input::Html::Converters::Ol
         
     | 
| 
      
 7 
     | 
    
         
            +
                    LIST_TAGS = ["ol", "ul", "dir"].freeze
         
     | 
| 
       16 
8 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
                       
     | 
| 
       19 
     | 
    
         
            -
                      # res = "\n" + res if node.parent && node.parent.name == 'note'
         
     | 
| 
       20 
     | 
    
         
            -
                    end
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
                    def number_style(node)
         
     | 
| 
       23 
     | 
    
         
            -
                      case node["style"]
         
     | 
| 
       24 
     | 
    
         
            -
                      when "1" then "arabic"
         
     | 
| 
       25 
     | 
    
         
            -
                      when "A" then "upperalpha"
         
     | 
| 
       26 
     | 
    
         
            -
                      when "a" then "loweralpha"
         
     | 
| 
       27 
     | 
    
         
            -
                      when "I" then "upperroman"
         
     | 
| 
       28 
     | 
    
         
            -
                      when "i" then "lowerroman"
         
     | 
| 
       29 
     | 
    
         
            -
                      end
         
     | 
| 
       30 
     | 
    
         
            -
                    end
         
     | 
| 
      
 9 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
      
 10 
     | 
    
         
            +
                      content = super(node, state)
         
     | 
| 
       31 
11 
     | 
    
         | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                       
     | 
| 
       34 
     | 
    
         
            -
                      reversed = "%reversed" if node["reversed"]
         
     | 
| 
       35 
     | 
    
         
            -
                      start = "start=#{node['start']}" if node["start"]
         
     | 
| 
       36 
     | 
    
         
            -
                      type = "type=#{node['type']}" if node["type"]
         
     | 
| 
       37 
     | 
    
         
            -
                      attrs = []
         
     | 
| 
       38 
     | 
    
         
            -
                      attrs << style if style
         
     | 
| 
       39 
     | 
    
         
            -
                      attrs << reversed if reversed
         
     | 
| 
       40 
     | 
    
         
            -
                      attrs << start if start
         
     | 
| 
       41 
     | 
    
         
            -
                      attrs << type if type
         
     | 
| 
       42 
     | 
    
         
            -
                      if attrs.empty?
         
     | 
| 
       43 
     | 
    
         
            -
                        ""
         
     | 
| 
       44 
     | 
    
         
            -
                      else
         
     | 
| 
       45 
     | 
    
         
            -
                        "[#{attrs.join(',')}]\n"
         
     | 
| 
       46 
     | 
    
         
            -
                      end
         
     | 
| 
      
 12 
     | 
    
         
            +
                      # Dont make early parse on nested lists
         
     | 
| 
      
 13 
     | 
    
         
            +
                      LIST_TAGS.include?(node.parent.name) ? content : Coradoc::Generator.gen_adoc(content) + "\n"
         
     | 
| 
       47 
14 
     | 
    
         
             
                    end
         
     | 
| 
       48 
15 
     | 
    
         
             
                  end
         
     | 
| 
       49 
16 
     | 
    
         | 
| 
       50 
     | 
    
         
            -
                   
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
                   
     | 
| 
      
 17 
     | 
    
         
            +
                  Ol::LIST_TAGS.each do |tag|
         
     | 
| 
      
 18 
     | 
    
         
            +
                    Coradoc::Input::Html::Converters.register tag.to_sym, Ol.new
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end
         
     | 
| 
       53 
20 
     | 
    
         
             
                end
         
     | 
| 
       54 
21 
     | 
    
         
             
              end
         
     | 
| 
       55 
22 
     | 
    
         
             
            end
         
     | 
| 
         @@ -4,11 +4,11 @@ module Stepmod 
     | 
|
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class Resource < Stepmod::Utils::Converters::Base
         
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       8 
8 
     | 
    
         
             
                      treat_children(node, state)
         
     | 
| 
       9 
9 
     | 
    
         
             
                    end
         
     | 
| 
       10 
10 
     | 
    
         
             
                  end
         
     | 
| 
       11 
     | 
    
         
            -
                   
     | 
| 
      
 11 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :resource, Resource.new
         
     | 
| 
       12 
12 
     | 
    
         
             
                end
         
     | 
| 
       13 
13 
     | 
    
         
             
              end
         
     | 
| 
       14 
14 
     | 
    
         
             
            end
         
     | 
| 
         @@ -4,7 +4,7 @@ module Stepmod 
     | 
|
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class Schema < Stepmod::Utils::Converters::Base
         
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       8 
8 
     | 
    
         
             
                      state = state.merge(schema_name: node["name"])
         
     | 
| 
       9 
9 
     | 
    
         
             
                      <<~TEMPLATE
         
     | 
| 
       10 
10 
     | 
    
         
             
                        (*"#{node['name']}"
         
     | 
| 
         @@ -13,7 +13,7 @@ module Stepmod 
     | 
|
| 
       13 
13 
     | 
    
         
             
                      TEMPLATE
         
     | 
| 
       14 
14 
     | 
    
         
             
                    end
         
     | 
| 
       15 
15 
     | 
    
         
             
                  end
         
     | 
| 
       16 
     | 
    
         
            -
                   
     | 
| 
      
 16 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :schema, Schema.new
         
     | 
| 
       17 
17 
     | 
    
         
             
                end
         
     | 
| 
       18 
18 
     | 
    
         
             
              end
         
     | 
| 
       19 
19 
     | 
    
         
             
            end
         
     | 
| 
         @@ -4,11 +4,11 @@ module Stepmod 
     | 
|
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class SchemaDiag < Stepmod::Utils::Converters::Base
         
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       8 
8 
     | 
    
         
             
                      treat_children(node, state).strip
         
     | 
| 
       9 
9 
     | 
    
         
             
                    end
         
     | 
| 
       10 
10 
     | 
    
         
             
                  end
         
     | 
| 
       11 
     | 
    
         
            -
                   
     | 
| 
      
 11 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :schema_diag, SchemaDiag.new
         
     | 
| 
       12 
12 
     | 
    
         
             
                end
         
     | 
| 
       13 
13 
     | 
    
         
             
              end
         
     | 
| 
       14 
14 
     | 
    
         
             
            end
         
     | 
| 
         @@ -2,7 +2,7 @@ module Stepmod 
     | 
|
| 
       2 
2 
     | 
    
         
             
              module Utils
         
     | 
| 
       3 
3 
     | 
    
         
             
                module Converters
         
     | 
| 
       4 
4 
     | 
    
         
             
                  class StepmodExtDescription < Stepmod::Utils::Converters::Base
         
     | 
| 
       5 
     | 
    
         
            -
                    def  
     | 
| 
      
 5 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       6 
6 
     | 
    
         
             
                      state = state.merge(schema_name: node["linkend"])
         
     | 
| 
       7 
7 
     | 
    
         
             
                      linkend = node["linkend"].split(".")
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
         @@ -57,8 +57,8 @@ module Stepmod 
     | 
|
| 
       57 
57 
     | 
    
         
             
                      TEMPLATE
         
     | 
| 
       58 
58 
     | 
    
         
             
                    end
         
     | 
| 
       59 
59 
     | 
    
         
             
                  end
         
     | 
| 
       60 
     | 
    
         
            -
                   
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
      
 60 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :ext_description,
         
     | 
| 
      
 61 
     | 
    
         
            +
                                                            StepmodExtDescription.new
         
     | 
| 
       62 
62 
     | 
    
         
             
                end
         
     | 
| 
       63 
63 
     | 
    
         
             
              end
         
     | 
| 
       64 
64 
     | 
    
         
             
            end
         
     | 
| 
         @@ -6,7 +6,7 @@ module Stepmod 
     | 
|
| 
       6 
6 
     | 
    
         
             
                  class Strong < Stepmod::Utils::Converters::Base
         
     | 
| 
       7 
7 
     | 
    
         
             
                    BLANK_CHARS = "{blank}"
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
                    def  
     | 
| 
      
 9 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       10 
10 
     | 
    
         
             
                      bold_converted(node, state)
         
     | 
| 
       11 
11 
     | 
    
         
             
                    end
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
         @@ -66,8 +66,8 @@ module Stepmod 
     | 
|
| 
       66 
66 
     | 
    
         
             
                    end
         
     | 
| 
       67 
67 
     | 
    
         
             
                  end
         
     | 
| 
       68 
68 
     | 
    
         | 
| 
       69 
     | 
    
         
            -
                   
     | 
| 
       70 
     | 
    
         
            -
                   
     | 
| 
      
 69 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :strong, Strong.new
         
     | 
| 
      
 70 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :b,      Strong.new
         
     | 
| 
       71 
71 
     | 
    
         
             
                end
         
     | 
| 
       72 
72 
     | 
    
         
             
              end
         
     | 
| 
       73 
73 
     | 
    
         
             
            end
         
     | 
| 
         @@ -3,12 +3,14 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            module Stepmod
         
     | 
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
     | 
    
         
            -
                  class Sub <  
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
       8 
     | 
    
         
            -
                       
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                       
     | 
| 
      
 6 
     | 
    
         
            +
                  class Sub < Coradoc::Input::Html::Converters::Sub
         
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
      
 8 
     | 
    
         
            +
                      if state[:equation]
         
     | 
| 
      
 9 
     | 
    
         
            +
                        stem_notation(treat_children(node,
         
     | 
| 
      
 10 
     | 
    
         
            +
                                                     state))
         
     | 
| 
      
 11 
     | 
    
         
            +
                      else
         
     | 
| 
      
 12 
     | 
    
         
            +
                        super(node, state)
         
     | 
| 
      
 13 
     | 
    
         
            +
                      end
         
     | 
| 
       12 
14 
     | 
    
         
             
                    end
         
     | 
| 
       13 
15 
     | 
    
         | 
| 
       14 
16 
     | 
    
         
             
                    private
         
     | 
| 
         @@ -18,7 +20,7 @@ module Stepmod 
     | 
|
| 
       18 
20 
     | 
    
         
             
                    end
         
     | 
| 
       19 
21 
     | 
    
         
             
                  end
         
     | 
| 
       20 
22 
     | 
    
         | 
| 
       21 
     | 
    
         
            -
                   
     | 
| 
      
 23 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :sub, Sub.new
         
     | 
| 
       22 
24 
     | 
    
         
             
                end
         
     | 
| 
       23 
25 
     | 
    
         
             
              end
         
     | 
| 
       24 
26 
     | 
    
         
             
            end
         
     | 
| 
         @@ -3,12 +3,14 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            module Stepmod
         
     | 
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
     | 
    
         
            -
                  class Sup <  
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
       8 
     | 
    
         
            -
                       
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                       
     | 
| 
      
 6 
     | 
    
         
            +
                  class Sup < Coradoc::Input::Html::Converters::Sup
         
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
      
 8 
     | 
    
         
            +
                      if state[:equation]
         
     | 
| 
      
 9 
     | 
    
         
            +
                        stem_notation(treat_children(node,
         
     | 
| 
      
 10 
     | 
    
         
            +
                                                     state))
         
     | 
| 
      
 11 
     | 
    
         
            +
                      else
         
     | 
| 
      
 12 
     | 
    
         
            +
                        super(node, state)
         
     | 
| 
      
 13 
     | 
    
         
            +
                      end
         
     | 
| 
       12 
14 
     | 
    
         
             
                    end
         
     | 
| 
       13 
15 
     | 
    
         | 
| 
       14 
16 
     | 
    
         
             
                    def stem_notation(content)
         
     | 
| 
         @@ -16,7 +18,7 @@ module Stepmod 
     | 
|
| 
       16 
18 
     | 
    
         
             
                    end
         
     | 
| 
       17 
19 
     | 
    
         
             
                  end
         
     | 
| 
       18 
20 
     | 
    
         | 
| 
       19 
     | 
    
         
            -
                   
     | 
| 
      
 21 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :sup, Sup.new
         
     | 
| 
       20 
22 
     | 
    
         
             
                end
         
     | 
| 
       21 
23 
     | 
    
         
             
              end
         
     | 
| 
       22 
24 
     | 
    
         
             
            end
         
     | 
| 
         @@ -4,12 +4,12 @@ module Stepmod 
     | 
|
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
6 
     | 
    
         
             
                  class Synonym < Stepmod::Utils::Converters::Base
         
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, _state = {})
         
     | 
| 
       8 
8 
     | 
    
         
             
                      "alt:[#{node.text.strip}]"
         
     | 
| 
       9 
9 
     | 
    
         
             
                    end
         
     | 
| 
       10 
10 
     | 
    
         
             
                  end
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                   
     | 
| 
      
 12 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :synonym, Synonym.new
         
     | 
| 
       13 
13 
     | 
    
         
             
                end
         
     | 
| 
       14 
14 
     | 
    
         
             
              end
         
     | 
| 
       15 
15 
     | 
    
         
             
            end
         
     | 
| 
         @@ -3,7 +3,7 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            module Stepmod
         
     | 
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
     | 
    
         
            -
                  class Table <  
     | 
| 
      
 6 
     | 
    
         
            +
                  class Table < Coradoc::Input::Html::Converters::Table
         
     | 
| 
       7 
7 
     | 
    
         
             
                    def self.pattern(state, id)
         
     | 
| 
       8 
8 
     | 
    
         
             
                      if state[:schema_and_entity].nil?
         
     | 
| 
       9 
9 
     | 
    
         
             
                        raise StandardError.new("[table]: no state given, #{id}")
         
     | 
| 
         @@ -13,7 +13,7 @@ module Stepmod 
     | 
|
| 
       13 
13 
     | 
    
         
             
                      "table-#{schema}-#{id}"
         
     | 
| 
       14 
14 
     | 
    
         
             
                    end
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
                    def  
     | 
| 
      
 16 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       17 
17 
     | 
    
         
             
                      # If we want to skip this node
         
     | 
| 
       18 
18 
     | 
    
         
             
                      return "" if state[:no_notes_examples]
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
         @@ -72,7 +72,7 @@ module Stepmod 
     | 
|
| 
       72 
72 
     | 
    
         
             
                    end
         
     | 
| 
       73 
73 
     | 
    
         
             
                  end
         
     | 
| 
       74 
74 
     | 
    
         | 
| 
       75 
     | 
    
         
            -
                   
     | 
| 
      
 75 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :table, Table.new
         
     | 
| 
       76 
76 
     | 
    
         
             
                end
         
     | 
| 
       77 
77 
     | 
    
         
             
              end
         
     | 
| 
       78 
78 
     | 
    
         
             
            end
         
     | 
| 
         @@ -15,7 +15,7 @@ module Stepmod 
     | 
|
| 
       15 
15 
     | 
    
         
             
                      res.map(&:strip).reject(&:empty?).join("")
         
     | 
| 
       16 
16 
     | 
    
         
             
                    end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
                    def  
     | 
| 
      
 18 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       19 
19 
     | 
    
         
             
                      first_child = node.children.find do |child|
         
     | 
| 
       20 
20 
     | 
    
         
             
                        child.name == "text" && !child.text.to_s.strip.empty?
         
     | 
| 
       21 
21 
     | 
    
         
             
                      end
         
     | 
| 
         @@ -40,7 +40,7 @@ module Stepmod 
     | 
|
| 
       40 
40 
     | 
    
         
             
                    end
         
     | 
| 
       41 
41 
     | 
    
         
             
                  end
         
     | 
| 
       42 
42 
     | 
    
         | 
| 
       43 
     | 
    
         
            -
                   
     | 
| 
      
 43 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :term, Term.new
         
     | 
| 
       44 
44 
     | 
    
         
             
                end
         
     | 
| 
       45 
45 
     | 
    
         
             
              end
         
     | 
| 
       46 
46 
     | 
    
         
             
            end
         
     | 
| 
         @@ -3,8 +3,8 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            module Stepmod
         
     | 
| 
       4 
4 
     | 
    
         
             
              module Utils
         
     | 
| 
       5 
5 
     | 
    
         
             
                module Converters
         
     | 
| 
       6 
     | 
    
         
            -
                  class Text <  
     | 
| 
       7 
     | 
    
         
            -
                    def  
     | 
| 
      
 6 
     | 
    
         
            +
                  class Text < Coradoc::Input::Html::Converters::Text
         
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
       8 
8 
     | 
    
         
             
                      if node.text.strip.empty?
         
     | 
| 
       9 
9 
     | 
    
         
             
                        treat_empty(node, state)
         
     | 
| 
       10 
10 
     | 
    
         
             
                      else
         
     | 
| 
         @@ -14,19 +14,6 @@ module Stepmod 
     | 
|
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
                    private
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
                    def treat_empty(node, state)
         
     | 
| 
       18 
     | 
    
         
            -
                      parent = node.parent.name.to_sym
         
     | 
| 
       19 
     | 
    
         
            -
                      if %i[ol ul].include?(parent) # Otherwise the identation is broken
         
     | 
| 
       20 
     | 
    
         
            -
                        ""
         
     | 
| 
       21 
     | 
    
         
            -
                      elsif state[:tdsinglepara]
         
     | 
| 
       22 
     | 
    
         
            -
                        ""
         
     | 
| 
       23 
     | 
    
         
            -
                      elsif node.text == " "        # Regular whitespace text node
         
     | 
| 
       24 
     | 
    
         
            -
                        " "
         
     | 
| 
       25 
     | 
    
         
            -
                      else
         
     | 
| 
       26 
     | 
    
         
            -
                        ""
         
     | 
| 
       27 
     | 
    
         
            -
                      end
         
     | 
| 
       28 
     | 
    
         
            -
                    end
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
17 
     | 
    
         
             
                    def treat_text(node, state)
         
     | 
| 
       31 
18 
     | 
    
         
             
                      text = node.text
         
     | 
| 
       32 
19 
     | 
    
         
             
                      text = preserve_nbsp(text)
         
     | 
| 
         @@ -77,7 +64,7 @@ module Stepmod 
     | 
|
| 
       77 
64 
     | 
    
         
             
                    end
         
     | 
| 
       78 
65 
     | 
    
         
             
                  end
         
     | 
| 
       79 
66 
     | 
    
         | 
| 
       80 
     | 
    
         
            -
                   
     | 
| 
      
 67 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :text, Text.new
         
     | 
| 
       81 
68 
     | 
    
         
             
                end
         
     | 
| 
       82 
69 
     | 
    
         
             
              end
         
     | 
| 
       83 
70 
     | 
    
         
             
            end
         
     | 
| 
         @@ -0,0 +1,17 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Stepmod
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Utils
         
     | 
| 
      
 5 
     | 
    
         
            +
                module Converters
         
     | 
| 
      
 6 
     | 
    
         
            +
                  class Tr < Coradoc::Input::Html::Converters::Tr
         
     | 
| 
      
 7 
     | 
    
         
            +
                    def to_coradoc(node, state = {})
         
     | 
| 
      
 8 
     | 
    
         
            +
                      content = super(node, state)
         
     | 
| 
      
 9 
     | 
    
         
            +
                      line_break = content.header ? "\n\n" : "\n"
         
     | 
| 
      
 10 
     | 
    
         
            +
                      Coradoc::Generator.gen_adoc(content).rstrip + line_break
         
     | 
| 
      
 11 
     | 
    
         
            +
                    end
         
     | 
| 
      
 12 
     | 
    
         
            +
                  end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                  Coradoc::Input::Html::Converters.register :tr, Tr.new
         
     | 
| 
      
 15 
     | 
    
         
            +
                end
         
     | 
| 
      
 16 
     | 
    
         
            +
              end
         
     | 
| 
      
 17 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -2,29 +2,21 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            require "stepmod/utils/converters/base"
         
     | 
| 
       4 
4 
     | 
    
         
             
            require "stepmod/utils/converters/a"
         
     | 
| 
       5 
     | 
    
         
            -
            require "stepmod/utils/converters/blockquote"
         
     | 
| 
       6 
     | 
    
         
            -
            require "stepmod/utils/converters/br"
         
     | 
| 
       7 
     | 
    
         
            -
            require "stepmod/utils/converters/bypass"
         
     | 
| 
       8 
     | 
    
         
            -
            require "stepmod/utils/converters/code"
         
     | 
| 
       9 
5 
     | 
    
         
             
            require "stepmod/utils/converters/description"
         
     | 
| 
       10 
     | 
    
         
            -
            require "stepmod/utils/converters/drop"
         
     | 
| 
       11 
6 
     | 
    
         
             
            require "stepmod/utils/converters/em_express_description"
         
     | 
| 
       12 
7 
     | 
    
         
             
            require "stepmod/utils/converters/example"
         
     | 
| 
       13 
8 
     | 
    
         
             
            require "stepmod/utils/converters/express_ref_express_description"
         
     | 
| 
       14 
9 
     | 
    
         
             
            require "stepmod/utils/converters/ext_description"
         
     | 
| 
       15 
10 
     | 
    
         
             
            require "stepmod/utils/converters/ext_descriptions"
         
     | 
| 
       16 
     | 
    
         
            -
            require "stepmod/utils/converters/head"
         
     | 
| 
       17 
     | 
    
         
            -
            require "stepmod/utils/converters/hr"
         
     | 
| 
       18 
     | 
    
         
            -
            require "stepmod/utils/converters/ignore"
         
     | 
| 
       19 
11 
     | 
    
         
             
            require "stepmod/utils/converters/module_ref_express_description"
         
     | 
| 
       20 
12 
     | 
    
         
             
            require "stepmod/utils/converters/note"
         
     | 
| 
       21 
     | 
    
         
            -
            require "stepmod/utils/converters/p"
         
     | 
| 
       22 
13 
     | 
    
         
             
            require "stepmod/utils/converters/pass_through"
         
     | 
| 
       23 
     | 
    
         
            -
            require "stepmod/utils/converters/q"
         
     | 
| 
       24 
14 
     | 
    
         
             
            require "stepmod/utils/converters/strong"
         
     | 
| 
       25 
15 
     | 
    
         
             
            require "stepmod/utils/converters/sub"
         
     | 
| 
       26 
16 
     | 
    
         
             
            require "stepmod/utils/converters/sup"
         
     | 
| 
       27 
17 
     | 
    
         
             
            require "stepmod/utils/converters/text"
         
     | 
| 
      
 18 
     | 
    
         
            +
            require "stepmod/utils/converters/tr"
         
     | 
| 
      
 19 
     | 
    
         
            +
            require "stepmod/utils/converters/li"
         
     | 
| 
       28 
20 
     | 
    
         
             
            require "stepmod/utils/cleaner"
         
     | 
| 
       29 
21 
     | 
    
         | 
| 
       30 
22 
     | 
    
         
             
            module Stepmod
         
     | 
| 
         @@ -42,9 +34,9 @@ module Stepmod 
     | 
|
| 
       42 
34 
     | 
    
         | 
| 
       43 
35 
     | 
    
         
             
                    root || (return "")
         
     | 
| 
       44 
36 
     | 
    
         | 
| 
       45 
     | 
    
         
            -
                     
     | 
| 
       46 
     | 
    
         
            -
                      result =  
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
      
 37 
     | 
    
         
            +
                    Coradoc::Input::Html.config.with(options) do
         
     | 
| 
      
 38 
     | 
    
         
            +
                      result = Coradoc::Input::Html::Converters.lookup(root.name).convert(root,
         
     | 
| 
      
 39 
     | 
    
         
            +
                                                                                          options)
         
     | 
| 
       48 
40 
     | 
    
         
             
                      Stepmod::Utils::Cleaner.new.tidy(result)
         
     | 
| 
       49 
41 
     | 
    
         
             
                    end
         
     | 
| 
       50 
42 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -1,33 +1,23 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            require "stepmod/utils/converters/base"
         
     | 
| 
       4 
     | 
    
         
            -
            require " 
     | 
| 
       5 
     | 
    
         
            -
            require " 
     | 
| 
      
 4 
     | 
    
         
            +
            require "coradoc/input/html/converters/bypass"
         
     | 
| 
      
 5 
     | 
    
         
            +
            require "coradoc/input/html/converters/pass_through"
         
     | 
| 
       6 
6 
     | 
    
         
             
            require "stepmod/utils/converters/a"
         
     | 
| 
       7 
     | 
    
         
            -
            require "stepmod/utils/converters/blockquote"
         
     | 
| 
       8 
     | 
    
         
            -
            require "stepmod/utils/converters/br"
         
     | 
| 
       9 
     | 
    
         
            -
            require "stepmod/utils/converters/bypass"
         
     | 
| 
       10 
     | 
    
         
            -
            require "stepmod/utils/converters/code"
         
     | 
| 
       11 
7 
     | 
    
         
             
            require "stepmod/utils/converters/comment"
         
     | 
| 
       12 
8 
     | 
    
         
             
            require "stepmod/utils/converters/dd"
         
     | 
| 
       13 
9 
     | 
    
         
             
            require "stepmod/utils/converters/dl"
         
     | 
| 
       14 
10 
     | 
    
         
             
            require "stepmod/utils/converters/dt"
         
     | 
| 
       15 
     | 
    
         
            -
            require "stepmod/utils/converters/drop"
         
     | 
| 
       16 
11 
     | 
    
         
             
            require "stepmod/utils/converters/example"
         
     | 
| 
       17 
12 
     | 
    
         
             
            require "stepmod/utils/converters/express_g"
         
     | 
| 
       18 
13 
     | 
    
         
             
            require "stepmod/utils/converters/figure"
         
     | 
| 
       19 
14 
     | 
    
         
             
            require "stepmod/utils/converters/fund_cons"
         
     | 
| 
       20 
15 
     | 
    
         
             
            require "stepmod/utils/converters/eqn"
         
     | 
| 
       21 
     | 
    
         
            -
            require "stepmod/utils/converters/head"
         
     | 
| 
       22 
     | 
    
         
            -
            require "stepmod/utils/converters/hr"
         
     | 
| 
       23 
     | 
    
         
            -
            require "stepmod/utils/converters/ignore"
         
     | 
| 
       24 
16 
     | 
    
         
             
            require "stepmod/utils/converters/introduction"
         
     | 
| 
       25 
17 
     | 
    
         
             
            require "stepmod/utils/converters/note"
         
     | 
| 
       26 
18 
     | 
    
         
             
            require "stepmod/utils/converters/ol"
         
     | 
| 
       27 
     | 
    
         
            -
            require "stepmod/utils/converters/p"
         
     | 
| 
       28 
19 
     | 
    
         
             
            require "stepmod/utils/converters/pass_through"
         
     | 
| 
       29 
20 
     | 
    
         
             
            require "stepmod/utils/converters/module_ref"
         
     | 
| 
       30 
     | 
    
         
            -
            require "stepmod/utils/converters/q"
         
     | 
| 
       31 
21 
     | 
    
         
             
            require "stepmod/utils/converters/resource"
         
     | 
| 
       32 
22 
     | 
    
         
             
            require "stepmod/utils/converters/schema_diag"
         
     | 
| 
       33 
23 
     | 
    
         
             
            require "stepmod/utils/converters/schema"
         
     | 
| 
         @@ -36,13 +26,15 @@ require "stepmod/utils/converters/sub" 
     | 
|
| 
       36 
26 
     | 
    
         
             
            require "stepmod/utils/converters/sup"
         
     | 
| 
       37 
27 
     | 
    
         
             
            require "stepmod/utils/converters/table"
         
     | 
| 
       38 
28 
     | 
    
         
             
            require "stepmod/utils/converters/text"
         
     | 
| 
      
 29 
     | 
    
         
            +
            require "stepmod/utils/converters/tr"
         
     | 
| 
      
 30 
     | 
    
         
            +
            require "stepmod/utils/converters/li"
         
     | 
| 
       39 
31 
     | 
    
         
             
            require "stepmod/utils/cleaner"
         
     | 
| 
       40 
32 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
            require " 
     | 
| 
       42 
     | 
    
         
            -
            require " 
     | 
| 
       43 
     | 
    
         
            -
            require " 
     | 
| 
       44 
     | 
    
         
            -
            require " 
     | 
| 
       45 
     | 
    
         
            -
            require " 
     | 
| 
      
 33 
     | 
    
         
            +
            require "coradoc/input/html/converters/img"
         
     | 
| 
      
 34 
     | 
    
         
            +
            require "coradoc/input/html/converters/li"
         
     | 
| 
      
 35 
     | 
    
         
            +
            require "coradoc/input/html/converters/tr"
         
     | 
| 
      
 36 
     | 
    
         
            +
            require "coradoc/input/html/converters/td"
         
     | 
| 
      
 37 
     | 
    
         
            +
            require "coradoc/input/html/converters/th"
         
     | 
| 
       46 
38 
     | 
    
         | 
| 
       47 
39 
     | 
    
         
             
            module Stepmod
         
     | 
| 
       48 
40 
     | 
    
         
             
              module Utils
         
     | 
| 
         @@ -59,9 +51,9 @@ module Stepmod 
     | 
|
| 
       59 
51 
     | 
    
         | 
| 
       60 
52 
     | 
    
         
             
                    root || (return "")
         
     | 
| 
       61 
53 
     | 
    
         | 
| 
       62 
     | 
    
         
            -
                     
     | 
| 
       63 
     | 
    
         
            -
                      result =  
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
      
 54 
     | 
    
         
            +
                    Coradoc::Input::Html.config.with(options) do
         
     | 
| 
      
 55 
     | 
    
         
            +
                      result = Coradoc::Input::Html::Converters.lookup(root.name).convert(root,
         
     | 
| 
      
 56 
     | 
    
         
            +
                                                                                          options)
         
     | 
| 
       65 
57 
     | 
    
         | 
| 
       66 
58 
     | 
    
         
             
                      Stepmod::Utils::Cleaner.new.tidy(result)
         
     | 
| 
       67 
59 
     | 
    
         
             
                    end
         
     |