mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +00:00
Bugfix: Images with captions didn't float correctly.
This commit is contained in:
parent
ef719c671e
commit
7a243215ec
4 changed files with 4 additions and 5 deletions
|
@ -20,6 +20,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
|
||||||
- Normalise utf8 text to avoid duplicate ids and missing search results.
|
- Normalise utf8 text to avoid duplicate ids and missing search results.
|
||||||
- Improved handling of mime types in some places in the API.
|
- Improved handling of mime types in some places in the API.
|
||||||
- Added `minified` option to `status` action to reduce data usage slightly
|
- Added `minified` option to `status` action to reduce data usage slightly
|
||||||
|
- Fixed floating images that have captions
|
||||||
- [Rest API] Fix `checklogin` action documentation
|
- [Rest API] Fix `checklogin` action documentation
|
||||||
- Fix link on credits page
|
- Fix link on credits page
|
||||||
|
|
||||||
|
|
|
@ -8433,8 +8433,7 @@ class PeppermintParsedown extends ParsedownExtra
|
||||||
|
|
||||||
if($imageCaption)
|
if($imageCaption)
|
||||||
{
|
{
|
||||||
//$rawStyle = $result["element"]["attributes"]["style"] ?? "";
|
$rawStyle = $result["element"]["text"][0]["attributes"]["style"];
|
||||||
$rawStyle = $result["element"]["attributes"]["style"];
|
|
||||||
$containerStyle = preg_replace('/^.*float/', "float", $rawStyle);
|
$containerStyle = preg_replace('/^.*float/', "float", $rawStyle);
|
||||||
$mediaStyle = preg_replace('/\s*float.*;/', "", $rawStyle);
|
$mediaStyle = preg_replace('/\s*float.*;/', "", $rawStyle);
|
||||||
$result["element"] = [
|
$result["element"] = [
|
||||||
|
|
|
@ -266,7 +266,7 @@
|
||||||
"author": "Emanuil Rusev & Starbeamrainbowlabs",
|
"author": "Emanuil Rusev & Starbeamrainbowlabs",
|
||||||
"description": "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https:\/\/github.com\/erusev\/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation, and also *requires* write access to the disk on first load.",
|
"description": "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https:\/\/github.com\/erusev\/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation, and also *requires* write access to the disk on first load.",
|
||||||
"id": "parser-parsedown",
|
"id": "parser-parsedown",
|
||||||
"lastupdate": 1517750660,
|
"lastupdate": 1522917987,
|
||||||
"optional": false
|
"optional": false
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -598,8 +598,7 @@ class PeppermintParsedown extends ParsedownExtra
|
||||||
|
|
||||||
if($imageCaption)
|
if($imageCaption)
|
||||||
{
|
{
|
||||||
//$rawStyle = $result["element"]["attributes"]["style"] ?? "";
|
$rawStyle = $result["element"]["text"][0]["attributes"]["style"];
|
||||||
$rawStyle = $result["element"]["attributes"]["style"];
|
|
||||||
$containerStyle = preg_replace('/^.*float/', "float", $rawStyle);
|
$containerStyle = preg_replace('/^.*float/', "float", $rawStyle);
|
||||||
$mediaStyle = preg_replace('/\s*float.*;/', "", $rawStyle);
|
$mediaStyle = preg_replace('/\s*float.*;/', "", $rawStyle);
|
||||||
$result["element"] = [
|
$result["element"] = [
|
||||||
|
|
Loading…
Reference in a new issue