10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/asciidoctor/foodogsquared/converter.rb', line 10
def convert_chat(node)
attributes = []
attributes << %(id="#{node.id}") if node.id
attributes << %(class="#{node.role}") if node.role
avatar_sticker = node.attributes['avatarsticker']
avatar_uri = node.parent.image_uri avatar_sticker, 'avatarsdir'
" <div role=\"figure\" \#{attributes.join ' '}>\n <div class=\"dialogblock-avatar\">\n <img src=\"\#{avatar_uri}\" alt=\"\#{node.attributes['name']}\">\n </div>\n <div class=\"dialogblock-text\">\n <small>\#{node.attributes['name']}</small>\n \#{node.content}\n </div>\n </div>\n HTML\nend\n"
|