@@ -71,7 +71,7 @@ local function is_valid_size(size)
71
71
return ' font-size: ' .. value .. ' ;'
72
72
end
73
73
end
74
- return ' font-size: ' .. size .. ' ;'
74
+ return ' font-size: ' .. size .. ' ;'
75
75
end
76
76
77
77
return {
@@ -87,7 +87,7 @@ return {
87
87
end
88
88
89
89
local attributes = ' icon="' .. set .. ' :' .. icon .. ' "'
90
- local label = ' " Icon ' .. icon .. ' from ' .. set .. ' Iconify.design set." '
90
+ local default_label = ' Icon ' .. icon .. ' from ' .. set .. ' Iconify.design set.'
91
91
92
92
local size = is_valid_size (pandoc .utils .stringify (kwargs [" size" ]))
93
93
if not is_empty (size ) then
@@ -96,20 +96,20 @@ return {
96
96
97
97
local aria_label = pandoc .utils .stringify (kwargs [" label" ])
98
98
if is_empty (aria_label ) then
99
- aria_label = ' aria-label="' .. label .. ' "'
100
- else
101
- attributes = attributes .. aria_label
99
+ aria_label = ' aria-label="' .. default_label .. ' "'
100
+ else
101
+ aria_label = ' aria-label=" ' .. aria_label .. ' " '
102
102
end
103
+
103
104
local title = pandoc .utils .stringify (kwargs [" title" ])
104
105
if is_empty (title ) then
105
- title = ' title="' .. label .. ' "'
106
- else
107
- attributes = attributes .. title
106
+ title = ' title="' .. default_label .. ' "'
107
+ else
108
+ title = ' title=" ' .. title .. ' " '
108
109
end
109
- -- local style = pandoc.utils.stringify(kwargs["style"])
110
- -- if not is_empty(style) then
111
- -- local attributes = attributes .. ' style="' .. style .. '"'
112
- -- end
110
+
111
+ attributes = attributes .. aria_label .. title
112
+
113
113
local width = pandoc .utils .stringify (kwargs [" width" ])
114
114
if not is_empty (width ) and is_empty (size ) then
115
115
attributes = attributes .. ' width="' .. width .. ' "'
0 commit comments