From 552657fc584dbb36754d3fcabca2cdef7e916ec9 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 24 Apr 2014 19:41:07 +0100 Subject: [PATCH] Fix text parser to use codeblocks This means that JavaScript and JSON tiddlers will be properly highlighted if the highlight plugin is loaded. --- core/modules/parsers/textparser.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/modules/parsers/textparser.js b/core/modules/parsers/textparser.js index c5f74a310..518bba021 100644 --- a/core/modules/parsers/textparser.js +++ b/core/modules/parsers/textparser.js @@ -15,11 +15,11 @@ The plain text parser processes blocks of source text into a degenerate parse tr var TextParser = function(type,text,options) { this.tree = [{ type: "element", - tag: "pre", - children: [{ - type: "text", - text: text - }] + tag: "$codeblock", + attributes: { + code: {type: "string", value: text}, + language: {type: "string", value: type} + } }]; };