mirror of
https://github.com/foo-dogsquared/asciidoctor-foodogsquared-extensions.git
synced 2025-01-31 04:58:07 +00:00
Fix avatarstype
attribute override for chat block
This commit is contained in:
parent
53e225f76c
commit
1faf4d45ec
@ -6,7 +6,7 @@ class ChatBlock < Asciidoctor::Extensions::BlockProcessor
|
||||
named :chat
|
||||
on_context :example
|
||||
name_positional_attributes 'avatar', 'state'
|
||||
default_attributes 'state' => 'default', 'avatarstype' => 'avif'
|
||||
default_attributes 'state' => 'default'
|
||||
|
||||
def process(parent, reader, attrs)
|
||||
block = create_block parent, :pass, nil, attrs, content_model: :compound
|
||||
@ -23,6 +23,7 @@ class ChatBlock < Asciidoctor::Extensions::BlockProcessor
|
||||
))
|
||||
|
||||
attrs['avatarsdir'] ||= File.expand_path('./avatars', attrs['iconsdir'])
|
||||
attrs['avatarstype'] ||= 'avif'
|
||||
|
||||
avatar_sticker = "#{attrs['avatar'].to_kebab}/#{attrs['state'].to_kebab}.#{attrs['avatarstype']}"
|
||||
avatar_img_attrs = {
|
||||
|
Loading…
Reference in New Issue
Block a user