def initialize_html_tags
      @permitted_html_tags = {}
      tags = {
        # special tag used for elements with no parent, i.e. top level
        '#document-fragment' => { type: :block, ast_class: :root, allowed_children: %i[_block _inline] },

        # block level tags
        table: { type: :block, ast_class: :table, allowed_children: %i[caption thead tbody tfoot tr ]},
        tr: { type: :block, ast_class: :table_row, allowed_children: %i[th td] },
        th: { type: :block, ast_class: :table_cell, properties: { b: nil, jc: 'center' }, allowed_children: %i[_block _inline] },
        td: { type: :block, ast_class: :table_cell, allowed_children: %i[_block _inline] },
        div: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Normal' }, allowed_children: :_inline },
        p: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Paragraph' }, allowed_children: :_inline },
        caption: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Caption' }, allowed_children: :_inline },
        h1: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading1' }, allowed_children: :_inline },
        h2: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading2' }, allowed_children: :_inline },
        h3: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading3' }, allowed_children: :_inline },
        h4: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading4' }, allowed_children: :_inline },
        h5: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading5' }, allowed_children: :_inline },
        h6: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading6' }, allowed_children: :_inline },
        ol: { type: :block, ast_class: :list, properties: { pStyle: 'ListNumber' }, allowed_children: %i[ol li] },
        ul: { type: :block, ast_class: :list, properties: { pStyle: 'ListBullet' }, allowed_children: %i[ul li] },
        li: { type: :block, ast_class: :list_paragraph },

        # inline style tags for tables
        thead: { type: :inline, ast_class: nil, properties: { tblHeader: nil }, allowed_children: :tr },
        tbody: { type: :inline, ast_class: nil, properties: {}, allowed_children: :tr },
        tfoot: { type: :inline, ast_class: nil, properties: {}, allowed_children: :tr },

        # inline style tags
        span: { type: :inline, ast_class: nil, properties: {} },
        strong: { type: :inline, ast_class: nil, properties: { b: nil } },
        b: { type: :inline, ast_class: nil, properties: { b: nil } },
        em: { type: :inline, ast_class: nil, properties: { i: nil } },
        i: { type: :inline, ast_class: nil, properties: { i: nil } },
        u: { type: :inline, ast_class: nil, properties: { u: 'single' } },
        s: { type: :inline, ast_class: nil, properties: { strike: 'true' } },
        sub: { type: :inline, ast_class: nil, properties: { vertAlign: 'subscript' } },
        sup: { type: :inline, ast_class: nil, properties: { vertAlign: 'superscript' } },

        # inline content tags
        a: { type: :inline, ast_class: :hyperlink, properties: { rStyle: 'Hyperlink' } },
        text: { type: :inline, ast_class: :run, properties: {}, allowed_children: [] },
        br: { type: :inline, ast_class: :newline, properties: {}, allowed_children: [] }
      }
      # add all tags to the config object
      tags.each do |tag_name, settings|
        type = settings.delete(:type)
        register_html_tag(tag_name, type, **settings)
      end
    end
def initialize_html_tags
      @permitted_html_tags = {}
      tags = {
        # special tag used for elements with no parent, i.e. top level
        '#document-fragment' => { type: :block, ast_class: :root, allowed_children: %i[_block _inline] },

        # block level tags
        table: { type: :block, ast_class: :table, allowed_children: %i[caption thead tbody tfoot tr ]},
        tr: { type: :block, ast_class: :table_row, allowed_children: %i[th td] },
        th: { type: :block, ast_class: :table_cell, properties: { b: nil, jc: 'center' }, allowed_children: %i[_block _inline] },
        td: { type: :block, ast_class: :table_cell, allowed_children: %i[_block _inline] },
        div: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Normal' }, allowed_children: :_inline },
        p: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Paragraph' }, allowed_children: :_inline },
        caption: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Caption' }, allowed_children: :_inline },
        h1: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading1' }, allowed_children: :_inline },
        h2: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading2' }, allowed_children: :_inline },
        h3: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading3' }, allowed_children: :_inline },
        h4: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading4' }, allowed_children: :_inline },
        h5: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading5' }, allowed_children: :_inline },
        h6: { type: :block, ast_class: :paragraph, properties: { pStyle: 'Heading6' }, allowed_children: :_inline },
        ol: { type: :block, ast_class: :list, properties: { pStyle: 'ListNumber' }, allowed_children: %i[ol li] },
        ul: { type: :block, ast_class: :list, properties: { pStyle: 'ListBullet' }, allowed_children: %i[ul li] },
        li: { type: :block, ast_class: :list_paragraph },

        # inline style tags for tables
        thead: { type: :inline, ast_class: nil, properties: { tblHeader: nil }, allowed_children: :tr },
        tbody: { type: :inline, ast_class: nil, properties: {}, allowed_children: :tr },
        tfoot: { type: :inline, ast_class: nil, properties: {}, allowed_children: :tr },

        # inline style tags
        span: { type: :inline, ast_class: nil, properties: {} },
        strong: { type: :inline, ast_class: nil, properties: { b: nil } },
        b: { type: :inline, ast_class: nil, properties: { b: nil } },
        em: { type: :inline, ast_class: nil, properties: { i: nil } },
        i: { type: :inline, ast_class: nil, properties: { i: nil } },
        u: { type: :inline, ast_class: nil, properties: { u: 'single' } },
        s: { type: :inline, ast_class: nil, properties: { strike: 'true' } },
        sub: { type: :inline, ast_class: nil, properties: { vertAlign: 'subscript' } },
        sup: { type: :inline, ast_class: nil, properties: { vertAlign: 'superscript' } },

        # inline content tags
        a: { type: :inline, ast_class: :hyperlink, properties: { rStyle: 'Hyperlink' } },
        text: { type: :inline, ast_class: :run, properties: {}, allowed_children: [] },
        br: { type: :inline, ast_class: :newline, properties: {}, allowed_children: [] }
      }
      # add all tags to the config object
      tags.each do |tag_name, settings|
        type = settings.delete(:type)
        register_html_tag(tag_name, type, **settings)
      end
    end
Defines all of the initial HTML tags to be used by HTMLconverter