summaryrefslogtreecommitdiff
path: root/docs/modules/extend/examples/breakable-tables-tree-processor.rb
blob: 5311aab148b5ccaa30cf98c3fdf072d629e02651 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
Asciidoctor::Extensions.register do
  tree_processor do
    process do |doc|
      doc.find_by context: :table do |table|
        unless (table.option? 'breakable') || (table.option? 'unbreakable')
          table.set_option 'breakable'
        end
      end
      doc
    end
  end
end