Skip to content

Commit

Permalink
resolves #356 add support for 100%-wide table
Browse files Browse the repository at this point in the history
  • Loading branch information
slonopotamus committed Aug 17, 2020
1 parent 6b27daa commit 0532307
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[
* add title and id support for literal blocks (#357)
* fix quotes not being properly escaped in section titles (#358)
* fix crash when encountering unsupported Asciidoctor node (#360)
* add support for 100%-wide table (#356)

== 1.5.0.alpha.18 (2020-07-27) - @slonopotamus

Expand Down
4 changes: 1 addition & 3 deletions lib/asciidoctor-epub3/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,8 @@ def convert_table node
table_styles = []
if (autowidth = node.option? 'autowidth') && !(node.attr? 'width')
table_classes << 'fit-content'
elsif (tablewidth = node.attr 'tablepcwidth') == 100
table_classes << 'stretch'
else
table_styles << %(width: #{tablewidth}%;)
table_styles << %(width: #{node.attr 'tablepcwidth'}%;)
end
table_class_attr = %( class="#{table_classes * ' '}")
table_style_attr = !table_styles.empty? ? %( style="#{table_styles * '; '}") : ''
Expand Down

0 comments on commit 0532307

Please sign in to comment.