mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-21 16:13:00 +00:00
Fix #209
This commit is contained in:
parent
96140b1d51
commit
c2e4a04778
4 changed files with 20 additions and 7 deletions
|
@ -12,6 +12,9 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
|
|||
### 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)
|
||||
|
||||
### 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
|
||||
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.
|
||||
|
|
|
@ -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 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
|
||||
FULL_CHANGELOG_HERE
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
register_module([
|
||||
"name" => "Page editor",
|
||||
"version" => "0.17.8",
|
||||
"version" => "0.17.9",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Allows you to edit pages by adding the edit and save actions. You should probably include this one.",
|
||||
"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
|
||||
* @apiName PreviewPage
|
||||
* @apiGroup Editing
|
||||
|
|
|
@ -760,14 +760,18 @@ class PeppermintParsedown extends ParsedownExtra
|
|||
|
||||
$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
|
||||
array_pop($this->paramStack);
|
||||
|
||||
return [
|
||||
"name" => "div",
|
||||
"rawHtml" => $parsedTemplateSource,
|
||||
"elements" => $parsedTemplateSource,
|
||||
"attributes" => [
|
||||
"class" => "template"
|
||||
]
|
||||
|
@ -1257,8 +1261,14 @@ class PeppermintParsedown extends ParsedownExtra
|
|||
$result["element"],
|
||||
[
|
||||
"name" => "figcaption",
|
||||
// rawHtml is fine here 'cause we're using the output of $this->text(), which is safe
|
||||
"rawHtml" => $this->text($altText),
|
||||
// We use lineElements here because of issue #209 - in short it makes it appear as part of the same document to avoid breaking footnotes
|
||||
// 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"
|
||||
|
|
Loading…
Reference in a new issue