From e7938278eedd5bfbb260e9598947c3e39de413b6 Mon Sep 17 00:00:00 2001 From: amitport Date: Tue, 9 Apr 2013 15:25:36 +0300 Subject: [PATCH] default to 'html' for unknown file extensions before this change it passed unknown 'type' as is, and crashed in 'getRegex' --- lib/preprocess.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/preprocess.js b/lib/preprocess.js index f7b1ce9..600e5f8 100644 --- a/lib/preprocess.js +++ b/lib/preprocess.js @@ -50,7 +50,9 @@ function preprocess(src,context,type) { src = src.toString(); context = context || process.env; - type = type || 'html'; + if (typeof delim[type] === 'undefined'){ + type = 'html'; + } var rv = src;