mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Updated Ghostdown image regex
Updated dropzone regex to capture existing URL flag. Also supports the shorter markdown image syntax, and corrects issues with special characters in the alt field, fixing issue #146.
This commit is contained in:
parent
68cc640d23
commit
09ada68d9b
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
{
|
||||
type: 'lang',
|
||||
filter: function (source) {
|
||||
return source.replace(/\n?!image\[([\d\w\s]*)\]/gi, function (match, alt, a) {
|
||||
return source.replace(/\n?!(?:image)?\[([^\n\]]*)\](?:\(([^\n\)]*)\))?/gi, function (match, alt, a) {
|
||||
return '<section class="js-drop-zone image-uploader">' +
|
||||
'<span class="media"><span class="hidden">Image Upload</span></span>' +
|
||||
'<div class="description">Add image of <strong>' + alt + '</strong></div>' +
|
||||
|
|
Loading…
Add table
Reference in a new issue