Skip to content

Commit

Permalink
修复markdown文章带有 <!--markdown--> 标记的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxiyuan committed Dec 22, 2019
1 parent b9efab1 commit ea54d62
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,7 @@ public function wxr_posts_list($options)
$args = explode('/', $version_string);
$version = floatval($args[0]);
if (substr($row['text'], 0, 15) == '<!--markdown-->' && $version >= 1.0) {
//$parser = new Parser();
//$content = $parser->makeHtml($row['text']);
$content = Markdown::convert($row['text']);
$content = Markdown::convert(substr($row['text'], 15, strlen($row['text'])));
} else {
$content = $row['text'];
}
Expand Down
2 changes: 1 addition & 1 deletion Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @package ByeTyp
* @author sunxiyuan
* @version 1.3
* @version 1.4
* @link https://www.ibadboy.net
*/
class ByeTyp_Plugin implements Typecho_Plugin_Interface
Expand Down
2 changes: 1 addition & 1 deletion panel.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$current_version = 1.3;
$current_version = 1.4;

$version = file_get_contents('https://www.ibadboy.net/github/ByeTyp/version.php');
$message = '';
Expand Down

1 comment on commit ea54d62

@sunxiyuan
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1

Please sign in to comment.