Skip to content

Commit

Permalink
Fix issue #39
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Apr 5, 2020
1 parent 0bf5b63 commit a3c8502
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion assets/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ function ReplyBox(thread) {
title: (thread && thread.post.title) || mw.config.get('wgTitle'),
prop: 'text',
preview: true,
text: val
text: val,
pst: true,
}).done(function(result) {
previewPanel.html(result.parse.text['*']);
}).fail(function(error, obj) {
Expand Down
3 changes: 2 additions & 1 deletion includes/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ public function execute() {
// Set options for parsing
$opt = new \ParserOptions($this->getUser());

$output = $parser->parse($text, \Title::newFromId($page), $opt);
$text = $parser->preSaveTransform($text, $title, $this->getUser(), $opt);
$output = $parser->parse($text, $title, $opt);
$text = $output->getText(['enableSectionEditLinks' => false]); // Edit button will not work!

// Get all mentioned user
Expand Down

0 comments on commit a3c8502

Please sign in to comment.