feat: add image resize support in articles (#14293)
This commit is contained in:
@@ -257,4 +257,18 @@ describe CustomMarkdownRenderer do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#image' do
|
||||
it 'renders width in px with responsive cap and auto height' do
|
||||
markdown = ''
|
||||
expect(render_markdown(markdown)).to include(
|
||||
'style="width: 400px; max-width: 100%; height: auto;"'
|
||||
)
|
||||
end
|
||||
|
||||
it 'ignores a non-numeric width' do
|
||||
markdown = ''
|
||||
expect(render_markdown(markdown)).not_to include('style=')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user