mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-15 03:01:37 -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
26028a111b
commit
333a9288a1
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