1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00
This commit is contained in:
Starbeamrainbowlabs 2020-08-18 13:49:16 +01:00
parent 96140b1d51
commit c2e4a04778
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
4 changed files with 20 additions and 7 deletions

View file

@ -12,6 +12,9 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
### Fixed ### Fixed
- Hide the admin email address at the bottom of every page - we missed it in v0.22-beta1 (but got every other one though :P) - Hide the admin email address at the bottom of every page - we missed it in v0.22-beta1 (but got every other one though :P)
### Changed
- Disable parser cache by default to avoid issues because said cache isn't invalidated when it should be (and doing so would take more of a performance hit than leaving it on)
## v0.22-beta1 ## v0.22-beta1
Make sure you have PHP 7.3+ when you update past this point! It isn't the end of the world if you don't, but it will make you more secure if you do. Make sure you have PHP 7.3+ when you update past this point! It isn't the end of the world if you don't, but it will make you more secure if you do.

View file

@ -43,7 +43,7 @@ You can update to this release simply by grabbing an updated copy of `index.php`
For more information on the last 2 methods, please see [the documentation](https://starbeamrainbowlabs.com/labs/peppermint/__nightdocs/05-Getting-A-Copy.html) for more information. For more information on the last 2 methods, please see [the documentation](https://starbeamrainbowlabs.com/labs/peppermint/__nightdocs/05-Getting-A-Copy.html) for more information.
For those who want to contribute financially as a thank you, I've recently [setup a Liberapay](https://liberapay.com/sbrl) to accept donations. It's certainly not required, but would definitely help me out :-) For those who want to contribute financially as a thank you, I've recently [setup a Liberapay](https://liberapay.com/sbrl) to accept donations. It's certainly not required, but would definitely help me out :-) If you want to contribute but Liberapay isn't for you, please let me know (e.g. open an issue, see [my website for more contact options](https://starbeamrainbowlabs.com/))
## Since VERSION_NUMBER_HERE ## Since VERSION_NUMBER_HERE
FULL_CHANGELOG_HERE FULL_CHANGELOG_HERE

View file

@ -1,7 +1,7 @@
<?php <?php
register_module([ register_module([
"name" => "Page editor", "name" => "Page editor",
"version" => "0.17.8", "version" => "0.17.9",
"author" => "Starbeamrainbowlabs", "author" => "Starbeamrainbowlabs",
"description" => "Allows you to edit pages by adding the edit and save actions. You should probably include this one.", "description" => "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
"id" => "page-edit", "id" => "page-edit",
@ -236,7 +236,7 @@ window.addEventListener("load", function(event) {
}); });
/** /**
* @api {post} ?action=preview-edit&page={pageName}[&newpage=yes] Get a preview of the page * @api {post} ?action=preview-edit&page={pageName}[&newpage=yes] Get a preview of an edit to a page
* @apiDescription Gets a preview of the current edit state of a given page * @apiDescription Gets a preview of the current edit state of a given page
* @apiName PreviewPage * @apiName PreviewPage
* @apiGroup Editing * @apiGroup Editing

View file

@ -760,14 +760,18 @@ class PeppermintParsedown extends ParsedownExtra
$templateFilePath = $env->storage_prefix . $pageindex->$templatePagename->filename; $templateFilePath = $env->storage_prefix . $pageindex->$templatePagename->filename;
$parsedTemplateSource = $this->text(file_get_contents($templateFilePath)); // We use linesElements here to avoid resetting $this->DefinitionData (which is done in ->textElements)
// Consequently, we have to do what textElements does directly
$parsedTemplateSource = $this->linesElements(explode("\n",
trim(str_replace(["\r\n", "\r"], "\n", file_get_contents($templateFilePath)), "\n")
));
// Remove the parsed parameters from the stack // Remove the parsed parameters from the stack
array_pop($this->paramStack); array_pop($this->paramStack);
return [ return [
"name" => "div", "name" => "div",
"rawHtml" => $parsedTemplateSource, "elements" => $parsedTemplateSource,
"attributes" => [ "attributes" => [
"class" => "template" "class" => "template"
] ]
@ -1257,8 +1261,14 @@ class PeppermintParsedown extends ParsedownExtra
$result["element"], $result["element"],
[ [
"name" => "figcaption", "name" => "figcaption",
// rawHtml is fine here 'cause we're using the output of $this->text(), which is safe // We use lineElements here because of issue #209 - in short it makes it appear as part of the same document to avoid breaking footnotes
"rawHtml" => $this->text($altText), // Specifically ->text() calls ->textElements(), which resets $this->DefinitionData, which is used to hold information about footnotes
// lineElements = inline text, and linesElements = multiline text
"handler" => [
"function" => "lineElements",
"argument" => $altText,
"destination" => "elements"
]
], ],
], ],
"handler" => "elements" "handler" => "elements"