mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Extend plugin API for uploads (#8440)
* DEV: Add API to alter uploads Markdown * DEV: Extract data attributes from image / download Markdown For example '[test|attachment|hello=world]' will generate an 'a' element with a data attribute: 'data-hello=world'. This commit also makes MarkdownIt to transform '|attachment' into 'class="attachment"'. This transformation used to be a part of the process which resolves short URLs (i.e. upload://). * DEV: Export imageNameFromFileName
This commit is contained in:
@@ -34,6 +34,6 @@ QUnit.test("attachments are cooked properly", async assert => {
|
||||
find(".d-editor-preview:visible")
|
||||
.html()
|
||||
.trim(),
|
||||
'<p><a href="/uploads/short-url/asdsad.png" class="attachment">test</a></p>'
|
||||
'<p><a class="attachment" href="/uploads/short-url/asdsad.png">test</a></p>'
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user