Permalink
Browse files

fixed #18

  • Loading branch information...
codefine committed Mar 13, 2018
1 parent 6b4e4c0 commit ca2bc96e74e2a36168fd9e2f440ccdf0e5be0014
Showing with 15 additions and 3 deletions.
  1. +1 −1 README.md
  2. +8 −2 layout/_partial/post.ejs
  3. +6 −0 layout/page.ejs
@@ -1,6 +1,6 @@
hexo-theme-mellow
=================
[![](https://img.shields.io/badge/release-v1.2.6-blue.svg?style=flat-square)](https://github.com/codefine/hexo-theme-mellow/releases)
[![](https://img.shields.io/badge/release-v1.2.8-blue.svg?style=flat-square)](https://github.com/codefine/hexo-theme-mellow/releases)
[![](https://img.shields.io/badge/document-CN-green.svg?style=flat-square)](https://github.com/codefine/hexo-theme-mellow/wiki)
[![](https://img.shields.io/badge/preview-Michael.Lu's%20blog-ff69b4.svg?style=flat-square)](https://blog.lujingtao.com)
[![Join the chat at https://gitter.im/hexo-theme-mellow/Lobby](https://badges.gitter.im/hexo-theme-mellow/Lobby.svg)](https://gitter.im/codefine/hexo-theme-mellow?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
@@ -10,9 +10,15 @@
<%- partial('post/music') %>
</div>
<div class="post-content" id="post-content" itemprop="postContent">
<%
post.content = post.content.replace(/<table>(.+)<\/table>/, function(match, $1) {
$1 = $1.replace(/<br>/g, '');
return `<table>${$1}</table>`;
});
%>
<%- post.content.replace(/<p>}<\/p>/g, '</div>')
.replace(/<p>@([\w-]+){<\/p>/g, function(match, $1){
return '<div class="'+ $1 +'">'
.replace(/<p>@([\w-]+){<\/p>/g, function(match, $1){
return '<div class="'+ $1 +'">'
}) %>
</div>
<%- partial('post/copyright') %>
@@ -9,6 +9,12 @@
<div class="container body-wrap">
<article class="page-article fade" itemprop="blogPage">
<div class="post-content page-content" id="page-content" itemprop="pageContent">
<%
page.content = page.content.replace(/<table>(.+)<\/table>/, function(match, $1) {
$1 = $1.replace(/<br>/g, '');
return `<table>${$1}</table>`;
});
%>
<%- page.content.replace(/<p>}<\/p>/g, '</div>')
.replace(/<p>@([\w-]+){<\/p>/g, function(match, $1){
return '<div class="'+ $1 +'">'

0 comments on commit ca2bc96

Please sign in to comment.