1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-17 07:47:24 +00:00

Procedures and widgets inherit whitespace trim setting from their definition

This commit is contained in:
jeremy@jermolene.com
2022-05-23 15:30:33 +01:00
parent 170c4b1799
commit 22e7ec2381
7 changed files with 14 additions and 7 deletions

View File

@@ -32,6 +32,7 @@ options: see below:
parseAsInline: true to parse text as inline instead of block
wiki: reference to wiki to use
_canonical_uri: optional URI of content if text is missing or empty
configTrimWhiteSpace: true to trim whitespace
*/
var WikiParser = function(type,text,options) {
this.wiki = options.wiki;
@@ -46,7 +47,7 @@ var WikiParser = function(type,text,options) {
this.source = text || "";
this.sourceLength = this.source.length;
// Flag for ignoring whitespace
this.configTrimWhiteSpace = false;
this.configTrimWhiteSpace = options.configTrimWhiteSpace !== undefined ? options.configTrimWhiteSpace : false;
// Set current parse position
this.pos = 0;
// Start with empty output