From bced7124e41c8135303f159d33e0e43903b7ed84 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 1 May 2014 17:58:49 +0100 Subject: [PATCH] Accept single quotes for attributes in TW files --- core/modules/deserializers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/deserializers.js b/core/modules/deserializers.js index 89584c9ce..c976459ee 100644 --- a/core/modules/deserializers.js +++ b/core/modules/deserializers.js @@ -51,13 +51,13 @@ var parseTiddlerDiv = function(text /* [,fields] */) { // Extract the text result.text = text.substring(match.index + match[0].length,endMatch.index); // Process the attributes - var attrRegExp = /\s*([^=\s]+)\s*=\s*"([^"]*)"/gi, + var attrRegExp = /\s*([^=\s]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gi, attrMatch; do { attrMatch = attrRegExp.exec(match[1]); if(attrMatch) { var name = attrMatch[1]; - var value = attrMatch[2]; + var value = attrMatch[2] || attrMatch[3]; result[name] = value; } } while(attrMatch);