File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -800,6 +800,8 @@ require('render-markdown').setup({
800800 },
801801 -- Inlined with 'image' elements.
802802 image = ' ' ,
803+ -- Check custom for 'image' elements.
804+ image_custom = true ,
803805 -- Inlined with 'email_autolink' elements.
804806 email = ' ' ,
805807 -- Fallback icon for 'inline_link' and 'uri_autolink' elements.
@@ -1594,6 +1596,8 @@ require('render-markdown').setup({
15941596 },
15951597 -- Inlined with 'image' elements.
15961598 image = ' ' ,
1599+ -- Check custom for 'image' elements.
1600+ image_custom = true ,
15971601 -- Inlined with 'email_autolink' elements.
15981602 email = ' ' ,
15991603 -- Fallback icon for 'inline_link' and 'uri_autolink' elements.
Original file line number Diff line number Diff line change @@ -866,6 +866,8 @@ Default Configuration ~
866866 },
867867 -- Inlined with 'image' elements.
868868 image = ' ',
869+ -- Check custom for 'image' elements.
870+ image_custom = true,
869871 -- Inlined with 'email_autolink' elements.
870872 email = ' ',
871873 -- Fallback icon for 'inline_link' and 'uri_autolink' elements.
@@ -1640,6 +1642,8 @@ Link Configuration ~
16401642 },
16411643 -- Inlined with 'image' elements.
16421644 image = ' ',
1645+ -- Check custom for 'image' elements.
1646+ image_custom = true,
16431647 -- Inlined with 'email_autolink' elements.
16441648 email = ' ',
16451649 -- Fallback icon for 'inline_link' and 'uri_autolink' elements.
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ local state = require('render-markdown.state')
66local M = {}
77
88--- @private
9- M .version = ' 8.11.10 '
9+ M .version = ' 8.11.11 '
1010
1111function M .check ()
1212 M .start (' versions' )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function Render:setup()
3030 elseif self .node .type == ' image' then
3131 icon [1 ] = self .config .image
3232 local destination = self .node :child (' link_destination' )
33- if destination then
33+ if destination and self . config . image_custom then
3434 self .context .config :set_link_text (destination .text , icon )
3535 end
3636 title = self .node :child (' link_title' )
Original file line number Diff line number Diff line change @@ -1225,6 +1225,7 @@ M.link = {}
12251225--- @class (exact ) render.md.link.Config : render.md.base.Config
12261226--- @field footnote render.md.link.footnote.Config
12271227--- @field image string
1228+ --- @field image_custom boolean
12281229--- @field email string
12291230--- @field hyperlink string
12301231--- @field highlight string
@@ -1297,6 +1298,8 @@ M.link.default = {
12971298 },
12981299 -- Inlined with 'image' elements.
12991300 image = ' ' ,
1301+ -- Check custom for 'image' elements.
1302+ image_custom = true ,
13001303 -- Inlined with 'email_autolink' elements.
13011304 email = ' ' ,
13021305 -- Fallback icon for 'inline_link' and 'uri_autolink' elements.
@@ -1378,6 +1381,7 @@ function M.link.schema()
13781381 },
13791382 },
13801383 image = { type = ' string' },
1384+ image_custom = { type = ' boolean' },
13811385 email = { type = ' string' },
13821386 hyperlink = { type = ' string' },
13831387 highlight = { type = ' string' },
Original file line number Diff line number Diff line change 214214--- @class (exact ) render.md.link.UserConfig : render.md.base.UserConfig
215215--- @field footnote ? render.md.link.footnote.UserConfig
216216--- @field image ? string
217+ --- @field image_custom ? boolean
217218--- @field email ? string
218219--- @field hyperlink ? string
219220--- @field highlight ? string
You can’t perform that action at this time.
0 commit comments