diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-10-09 15:11:12 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-10-09 15:12:33 -0600 |
| commit | 7b8a7524af26544d3465d5e3679c144bdc03ae3a (patch) | |
| tree | b9d9c20b21dacb39bfa59dbf1c7aaf11a38fa2b2 | |
| parent | 4bab183b9f3fad538f86071b2106f3b8185d3832 (diff) | |
remove unnecessary fallback value when resolving stylesdir
| -rw-r--r-- | lib/asciidoctor/converter/html5.rb | 6 | ||||
| -rw-r--r-- | lib/asciidoctor/syntax_highlighter/coderay.rb | 2 | ||||
| -rw-r--r-- | lib/asciidoctor/syntax_highlighter/pygments.rb | 2 | ||||
| -rw-r--r-- | lib/asciidoctor/syntax_highlighter/rouge.rb | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/asciidoctor/converter/html5.rb b/lib/asciidoctor/converter/html5.rb index 04c86fce..46efb92e 100644 --- a/lib/asciidoctor/converter/html5.rb +++ b/lib/asciidoctor/converter/html5.rb @@ -130,7 +130,7 @@ class Converter::Html5Converter < Converter::Base result << %(<link rel="stylesheet" href="#{asset_uri_scheme}//fonts.googleapis.com/css?family=#{webfonts.empty? ? 'Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700' : webfonts}"#{slash}>) end if linkcss - result << %(<link rel="stylesheet" href="#{node.normalize_web_path DEFAULT_STYLESHEET_NAME, (node.attr 'stylesdir', ''), false}"#{slash}>) + result << %(<link rel="stylesheet" href="#{node.normalize_web_path DEFAULT_STYLESHEET_NAME, (node.attr 'stylesdir'), false}"#{slash}>) else result << %(<style> #{Stylesheets.instance.primary_stylesheet_data} @@ -138,7 +138,7 @@ class Converter::Html5Converter < Converter::Base end elsif node.attr? 'stylesheet' if linkcss - result << %(<link rel="stylesheet" href="#{node.normalize_web_path (node.attr 'stylesheet'), (node.attr 'stylesdir', '')}"#{slash}>) + result << %(<link rel="stylesheet" href="#{node.normalize_web_path (node.attr 'stylesheet'), (node.attr 'stylesdir')}"#{slash}>) else result << %(<style> #{node.read_contents (node.attr 'stylesheet'), start: (node.attr 'stylesdir'), warn_on_failure: true, label: 'stylesheet'} @@ -151,7 +151,7 @@ class Converter::Html5Converter < Converter::Base result << %(<link rel="stylesheet" href="#{node.attr 'iconfont-cdn', %(#{cdn_base_url}/font-awesome/#{FONT_AWESOME_VERSION}/css/font-awesome.min.css)}"#{slash}>) else iconfont_stylesheet = %(#{node.attr 'iconfont-name', 'font-awesome'}.css) - result << %(<link rel="stylesheet" href="#{node.normalize_web_path iconfont_stylesheet, (node.attr 'stylesdir', ''), false}"#{slash}>) + result << %(<link rel="stylesheet" href="#{node.normalize_web_path iconfont_stylesheet, (node.attr 'stylesdir'), false}"#{slash}>) end end diff --git a/lib/asciidoctor/syntax_highlighter/coderay.rb b/lib/asciidoctor/syntax_highlighter/coderay.rb index 5d7174f2..d6d1a6be 100644 --- a/lib/asciidoctor/syntax_highlighter/coderay.rb +++ b/lib/asciidoctor/syntax_highlighter/coderay.rb @@ -38,7 +38,7 @@ class SyntaxHighlighter::CodeRayAdapter < SyntaxHighlighter::Base def docinfo location, doc, opts if opts[:linkcss] - %(<link rel="stylesheet" href="#{doc.normalize_web_path stylesheet_basename, (doc.attr 'stylesdir', ''), false}"#{opts[:self_closing_tag_slash]}>) + %(<link rel="stylesheet" href="#{doc.normalize_web_path stylesheet_basename, (doc.attr 'stylesdir'), false}"#{opts[:self_closing_tag_slash]}>) else %(<style> #{read_stylesheet} diff --git a/lib/asciidoctor/syntax_highlighter/pygments.rb b/lib/asciidoctor/syntax_highlighter/pygments.rb index 562176df..aab23e4b 100644 --- a/lib/asciidoctor/syntax_highlighter/pygments.rb +++ b/lib/asciidoctor/syntax_highlighter/pygments.rb @@ -64,7 +64,7 @@ class SyntaxHighlighter::PygmentsAdapter < SyntaxHighlighter::Base def docinfo location, doc, opts if opts[:linkcss] - %(<link rel="stylesheet" href="#{doc.normalize_web_path (stylesheet_basename @style), (doc.attr 'stylesdir', ''), false}"#{opts[:self_closing_tag_slash]}>) + %(<link rel="stylesheet" href="#{doc.normalize_web_path (stylesheet_basename @style), (doc.attr 'stylesdir'), false}"#{opts[:self_closing_tag_slash]}>) else %(<style> #{read_stylesheet @style} diff --git a/lib/asciidoctor/syntax_highlighter/rouge.rb b/lib/asciidoctor/syntax_highlighter/rouge.rb index 3709e4f6..7fb9513e 100644 --- a/lib/asciidoctor/syntax_highlighter/rouge.rb +++ b/lib/asciidoctor/syntax_highlighter/rouge.rb @@ -42,7 +42,7 @@ class SyntaxHighlighter::RougeAdapter < SyntaxHighlighter::Base def docinfo location, doc, opts if opts[:linkcss] - %(<link rel="stylesheet" href="#{doc.normalize_web_path (stylesheet_basename @style), (doc.attr 'stylesdir', ''), false}"#{opts[:self_closing_tag_slash]}>) + %(<link rel="stylesheet" href="#{doc.normalize_web_path (stylesheet_basename @style), (doc.attr 'stylesdir'), false}"#{opts[:self_closing_tag_slash]}>) else %(<style> #{read_stylesheet @style} |
