fix: correctly align images with title to the left

The right space for left or center alignment has to be between the image
id and the caption pipe.
This commit is contained in:
Michael Große
2018-01-30 14:00:02 +01:00
parent e20facdaa8
commit 16354267cf
3 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,22 @@
{
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "image",
"attrs": {
"src": "\/.\/lib\/exe\/fetch.php?media=wiki:dokuwiki-128.png",
"title": "foo and bar",
"class": "medialeft",
"align": "left",
"id": "wiki:dokuwiki-128.png",
"cache": "cache",
"linking": "details"
}
}
]
}
]
}

View File

@ -0,0 +1 @@
{{wiki:dokuwiki-128.png |foo and bar}}

View File

@ -54,7 +54,7 @@ class ImageNode extends Node
}
return '{{' . $leftAlign . $this->attrs['id'] . $queryString . $title . $rightAlign . '}}';
return '{{' . $leftAlign . $this->attrs['id'] . $queryString . $rightAlign . $title . '}}';
}
public static function render(\renderer_plugin_prosemirror $renderer, $src, $title = null, $align = null,