summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-11-08 23:50:25 -0700
committerDan Allen <dan.j.allen@gmail.com>2021-11-08 23:50:25 -0700
commit8ab203bae2c660ccf00fac66085d16bbc1665637 (patch)
treea797c9608a9b9cea3654e55a0ef20149ae48f101
parent34bd247150883f4b46922ffed40ae2c88401e53b (diff)
drop unnecessary brackets in converter
-rw-r--r--lib/asciidoctor/converter/html5.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/asciidoctor/converter/html5.rb b/lib/asciidoctor/converter/html5.rb
index 891ec6ce..091f3e31 100644
--- a/lib/asciidoctor/converter/html5.rb
+++ b/lib/asciidoctor/converter/html5.rb
@@ -93,7 +93,7 @@ class Converter::Html5Converter < Converter::Base
def convert_document node
br = %(<br#{slash = @void_element_slash}>)
- unless (asset_uri_scheme = (node.attr 'asset-uri-scheme', 'https')).empty?
+ unless (asset_uri_scheme = node.attr 'asset-uri-scheme', 'https').empty?
asset_uri_scheme = %(#{asset_uri_scheme}:)
end
cdn_base_url = %(#{asset_uri_scheme}//cdnjs.cloudflare.com/ajax/libs)
@@ -628,7 +628,7 @@ Your browser does not support the audio tag.
width_attr = (node.attr? 'width') ? %( width="#{node.attr 'width'}") : ''
height_attr = (node.attr? 'height') ? %( height="#{node.attr 'height'}") : ''
if ((node.attr? 'format', 'svg') || (target.include? '.svg')) && node.document.safe < SafeMode::SECURE &&
- ((svg = (node.option? 'inline')) || (obj = (node.option? 'interactive')))
+ ((svg = node.option? 'inline') || (obj = node.option? 'interactive'))
if svg
img = (read_svg_contents node, target) || %(<span class="alt">#{node.alt}</span>)
elsif obj
@@ -1031,7 +1031,7 @@ Your browser does not support the audio tag.
height_attribute = (node.attr? 'height') ? %( height="#{node.attr 'height'}") : ''
case node.attr 'poster'
when 'vimeo'
- unless (asset_uri_scheme = (node.document.attr 'asset-uri-scheme', 'https')).empty?
+ unless (asset_uri_scheme = node.document.attr 'asset-uri-scheme', 'https').empty?
asset_uri_scheme = %(#{asset_uri_scheme}:)
end
start_anchor = (node.attr? 'start') ? %(#at=#{node.attr 'start'}) : ''
@@ -1047,7 +1047,7 @@ Your browser does not support the audio tag.
</div>
</div>)
when 'youtube'
- unless (asset_uri_scheme = (node.document.attr 'asset-uri-scheme', 'https')).empty?
+ unless (asset_uri_scheme = node.document.attr 'asset-uri-scheme', 'https').empty?
asset_uri_scheme = %(#{asset_uri_scheme}:)
end
rel_param_val = (node.option? 'related') ? 1 : 0
@@ -1200,7 +1200,7 @@ Your browser does not support the video tag.
attrs << %( title="#{node.attr 'title'}") if node.attr? 'title'
attrs = attrs.empty? ? '' : attrs.join
if type != 'icon' && ((node.attr? 'format', 'svg') || (target.include? '.svg')) &&
- node.document.safe < SafeMode::SECURE && ((svg = (node.option? 'inline')) || (obj = (node.option? 'interactive')))
+ node.document.safe < SafeMode::SECURE && ((svg = node.option? 'inline') || (obj = node.option? 'interactive'))
if svg
img = (read_svg_contents node, target) || %(<span class="alt">#{node.alt}</span>)
elsif obj