Markdown attribute syntax for images
What does this MR do and why?
Feature flag: :markdown_image_attributes
Support inline attributes for specifying width and height for markdown images. This is based the syntax specified in https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/attributes.md.
For example,
{width=75%}
create the html
<img src="image.jpg" width="75%">
Only height
and width
are supported - there is no support for classes or other other attributes.
Screenshots or screen recordings
How to set up and validate locally
-
enable the feature flag,
Feature.enable(:markdown_image_attributes)
-
In a issue description or comment, add the following markdown
{ width=50 } { width=75% }
you should see the different sized images as in the screenshot above
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #28118 (closed)
Edited by Brett Walker