mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 17:23:00 +00:00
Tentative fix for style warnings when rendering image captions
This commit is contained in:
parent
160800def9
commit
0dde3c824b
4 changed files with 5 additions and 3 deletions
|
@ -7,6 +7,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
|
||||||
- Properly escaped content of short code box on file pages
|
- Properly escaped content of short code box on file pages
|
||||||
- Display a more meaningful message to a logged in user if editing is disabled
|
- Display a more meaningful message to a logged in user if editing is disabled
|
||||||
- Fixed fetching the size of SVGs in some cases
|
- Fixed fetching the size of SVGs in some cases
|
||||||
|
- Fixed image captions in some cases (let me know if you still get warnings)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Disallow uploads if editing is disabled. Previously files could still be uploaded even if editing was disabled - unless `upload_enabled` was set to `false`.
|
- Disallow uploads if editing is disabled. Previously files could still be uploaded even if editing was disabled - unless `upload_enabled` was set to `false`.
|
||||||
|
|
|
@ -8368,7 +8368,7 @@ class PeppermintParsedown extends ParsedownExtra
|
||||||
|
|
||||||
if($imageCaption)
|
if($imageCaption)
|
||||||
{
|
{
|
||||||
$rawStyle = $result["element"]["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": 1510610037,
|
"lastupdate": 1517750247,
|
||||||
"optional": false
|
"optional": false
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
register_module([
|
register_module([
|
||||||
"name" => "Parsedown",
|
"name" => "Parsedown",
|
||||||
"version" => "0.9.9",
|
"version" => "0.9.10",
|
||||||
"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",
|
||||||
|
@ -598,6 +598,7 @@ class PeppermintParsedown extends ParsedownExtra
|
||||||
|
|
||||||
if($imageCaption)
|
if($imageCaption)
|
||||||
{
|
{
|
||||||
|
//$rawStyle = $result["element"]["attributes"]["style"] ?? "";
|
||||||
$rawStyle = $result["element"]["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);
|
||||||
|
|
Loading…
Reference in a new issue