Closed 3rwolff closed 2 years ago
It seems that within the gem's file lib/prawn/markup/builders/list_builder.rb:161 the defaults for
inline_formatare not set to
true` by default for lists. That seems crazy as they are for tables and blocks.
You can modify the gem's method with the following:
def default_list_options
{
content: { inline_format: true },
bullet: { align: :right }
}
end
For users experiencing this issue, you can use this simple workaround directly from your rails app. Simply call prawn.markup
with the following option:
prawn.markup(text.to_s,
{
list: { content: { inline_format: true } }
}
)
I could not reproduce your issue. For nested lists, this behavior was fixed in 10a03502bc43532ba0559caa64e37998397194e3
Nested lists don't support embedded html. Any ordered/unordered list element that has a nested list element below it, will not support the markup such as , , . These tags will be converted to HTML entities (i.e.
<b>
will appear as<b>
). It appears that the symptomatic elements are being converted fromstrong
tob
tags for some reason (similar for italics which also have this issue).With the following rich text:
The output will appear as: