chat-block-processor: init block and attribute handling

This commit is contained in:
Gabriel Arazas 2023-04-03 23:13:48 +08:00
parent 136878bb27
commit e3231fb0b2
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -10,5 +10,12 @@ class ChatBlock < Asciidoctor::Extensions::BlockProcessor
# TODO: Create the output.
def process(parent, reader, attrs)
block = create_block parent, :pass, nil, attrs, content_model: :compound
block.add_role('dialogblock')
attrs['name'] ||= attrs['avatar']
attrs['avatarsdir'] ||= './avatars'
block
end
end