From 96dffa3a8cb5dbe4d4cb113c6501c1516cd24ed0 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Tue, 11 Oct 2016 09:42:11 +0800 Subject: [PATCH] fix template.html Signed-off-by: Le Tan --- resources/template.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/template.html b/resources/template.html index f9ea8079..0567380d 100644 --- a/resources/template.html +++ b/resources/template.html @@ -41,7 +41,7 @@ var markdownToHtml = function (markdown) { return marked(markdown, { renderer: renderer }); - } + }; var toPerfectToc = function (toc) { var i; @@ -61,11 +61,11 @@ curLevel = item.level; } return perfToc; - } + }; var itemToHtml = function (item) { return '' + item.title + ''; - } + }; var tocToTree = function (toc) { var i; @@ -105,18 +105,18 @@ front = front.replace("
  • ", ""); front = ''; return front; - } + }; var addToc = function(html) { var tocTree = tocToTree(toPerfectToc(toc)); html = html.replace(/

    \[TOC\]<\/p>/ig, tocTree); return html; - } + }; var updateText = function(text) { var html = markdownToHtml(text); placeholder.innerHTML = addToc(html); - } + }; new QWebChannel(qt.webChannelTransport, function(channel) {