diff --git a/lib/asciidoctor/chat-block-processor/extension.rb b/lib/asciidoctor/chat-block-processor/extension.rb index a612c7a..6589db9 100644 --- a/lib/asciidoctor/chat-block-processor/extension.rb +++ b/lib/asciidoctor/chat-block-processor/extension.rb @@ -17,10 +17,12 @@ class ChatBlock < Asciidoctor::Extensions::BlockProcessor # contains two output: the dialog image of our avatar and its content. attrs['name'] ||= attrs['avatar'] - block << (create_html_fragment block, %( + block << (create_html_fragment block, <<~HTML
- )) + HTML + + ) attrs['avatarsdir'] ||= File.expand_path('./avatars', attrs['iconsdir']) attrs['avatarstype'] ||= parent.attributes['avatarstype'] || 'avif' @@ -33,18 +35,20 @@ class ChatBlock < Asciidoctor::Extensions::BlockProcessor avatar_imgblock = create_image_block block, avatar_img_attrs block << avatar_imgblock - block << (create_html_fragment block, %( + block << (create_html_fragment block, <<~HTML
#{attrs['name']} - )) + HTML + ) parse_content block, reader - block << (create_html_fragment block, %( + block << (create_html_fragment block, <<~HTML
- )) + HTML + ) block end