diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-06 16:32:44 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-06 16:33:13 -0800 |
commit | 9f6f3c61b2231645eccc1aaa2910074260f15f58 (patch) | |
tree | b3b90af0cafb21d30f2acf2ddc8cf667906a6a3e | |
parent | addca151e5c812474be8b043bc94476812d256f0 (diff) |
preprocess recursively into #include's; fixes #1984
-rw-r--r-- | src/parseTools.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 874514b1..22e9b94c 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -49,7 +49,8 @@ function preprocess(text) { showStack.push(ident in this && this[ident] > 0); } } else if (line[2] == 'n') { // include - ret += '\n' + read(line.substr(line.indexOf(' ')+1)) + '\n' + var included = read(line.substr(line.indexOf(' ')+1)); + ret += '\n' + preprocess(included) + '\n' } } else if (line[2] == 'l') { // else showStack.push(!showStack.pop()); |