Skip to content
This repository
Browse code

prevent variables from spilling out into global scope

  • Loading branch information...
commit d8d7b94bc47f6367498a9ec718bc98231831e1cf 1 parent b53401f
Chase James authored November 18, 2013

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  lib/render.awk
6  lib/render.awk
@@ -76,7 +76,7 @@ END {
76 76
   }
77 77
 }
78 78
 
79  
-function bind_data(txt,   tag, key) {
  79
+function bind_data(txt,   tag, key, partial_txt) {
80 80
   if (match(txt, /{{> ([^}]*)}}/)) {
81 81
     tag = substr(txt, RSTART, RLENGTH)
82 82
     match(tag, /([[:alnum:]_]|[?]).*[^}]/)
@@ -102,7 +102,7 @@ function bind_data(txt,   tag, key) {
102 102
 # line.
103 103
 #
104 104
 # Nothing is returned if the file doesn't exist.
105  
-function load_partial(key,     partial, partial_file, line) {
  105
+function load_partial(key,     partial, pwd, partial_file, partial_txt, line) {
106 106
   partial = partials[key]
107 107
   if (partial) {
108 108
     return partial
@@ -128,7 +128,7 @@ function load_partial(key,     partial, partial_file, line) {
128 128
 }
129 129
 
130 130
 # Check if a file exists
131  
-function is_file(file) {
  131
+function is_file(file,    check, response) {
132 132
   check = "[ -f " file " ] && echo yes"
133 133
   check | getline response
134 134
   close(check)

0 notes on commit d8d7b94

Please sign in to comment.
Something went wrong with that request. Please try again.