summaryrefslogtreecommitdiff
path: root/docs/modules
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-07-06 17:14:43 -0600
committerDan Allen <dan.j.allen@gmail.com>2022-07-06 17:14:43 -0600
commit63d84a35fb9e1d786a4e91cd4952c066b574593f (patch)
treecd5d7905e22d2e42cfb84cc525bc9c695d707379 /docs/modules
parent37c22535e259ceebf4a7756f8fe1262abfcd2524 (diff)
don't attempt to call start_with? on a Symbol in the extended converter examples
Diffstat (limited to 'docs/modules')
-rw-r--r--docs/modules/extend/examples/pdf-converter-admonition-theme-per-type.rb2
-rw-r--r--docs/modules/extend/examples/pdf-converter-table-role.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/modules/extend/examples/pdf-converter-admonition-theme-per-type.rb b/docs/modules/extend/examples/pdf-converter-admonition-theme-per-type.rb
index c116add6..7e923a86 100644
--- a/docs/modules/extend/examples/pdf-converter-admonition-theme-per-type.rb
+++ b/docs/modules/extend/examples/pdf-converter-admonition-theme-per-type.rb
@@ -4,7 +4,7 @@ class PDFConverterAdmonitionThemePerType < (Asciidoctor::Converter.for 'pdf')
def convert_admonition node
type = node.attr 'name'
key_prefix = %(admonition_#{type}_)
- entries = theme.each_pair.select {|name, val| name.start_with? key_prefix }
+ entries = theme.each_pair.select {|name, val| name.to_s.start_with? key_prefix }
return super entries.empty?
save_theme do
entries.each do |name, val|
diff --git a/docs/modules/extend/examples/pdf-converter-table-role.rb b/docs/modules/extend/examples/pdf-converter-table-role.rb
index 5dd811c1..24ba226d 100644
--- a/docs/modules/extend/examples/pdf-converter-table-role.rb
+++ b/docs/modules/extend/examples/pdf-converter-table-role.rb
@@ -4,7 +4,7 @@ class PDFConverterTableRole < (Asciidoctor::Converter.for 'pdf')
def convert_table node
if node.role?
key_prefix = %(role_<table>_#{node.roles[0]}_)
- unless (role_entries = theme.each_pair.select {|name, val| name.start_with? key_prefix }).empty?
+ unless (role_entries = theme.each_pair.select {|name, val| name.to_s.start_with? key_prefix }).empty?
save_theme do
role_entries.each do |name, val|
theme[%(table_#{name.to_s.delete_prefix key_prefix})] = val