From 450f76aa495c7faa7ccc53c48e5173ee9b0dcf10 Mon Sep 17 00:00:00 2001 From: nuex Date: Tue, 18 Oct 2011 01:12:21 -0400 Subject: [PATCH] use awk regex operator --- HISTORY | 3 +++ VERSION | 2 +- lib/render.awk | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 78e0834..02a4e71 100644 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +0.1.1 / 2011-10-18 + * use awk regex operator + 0.1 / 2011-10-08 - First release * supports directories with spaces diff --git a/VERSION b/VERSION index 49d5957..17e51c3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1 +0.1.1 diff --git a/lib/render.awk b/lib/render.awk index 292dcc2..6fd994c 100644 --- a/lib/render.awk +++ b/lib/render.awk @@ -67,7 +67,7 @@ END { function bind_data(txt, tag, key) { if (match(txt, /{{([^}]*)}}/)) { tag = substr(txt, RSTART, RLENGTH) - match(tag, /(\w|[?]).*[^}]/) + match(tag, /([[:alnum:]_]|[?]).*[^}]/) key = substr(tag, RSTART, RLENGTH) gsub(tag, data[key], txt) return bind_data(txt, data)