1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 22:14:35 +00:00

fix: mp_gsubfile() now works with multiline files (and we have a multiline test to go with it)

This commit is contained in:
Allan Bowe
2021-09-16 18:30:17 +01:00
parent 2e7fcbe5b8
commit 7406288d79
6 changed files with 41 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ end
-- open file and perform the substitution
file = io.open(fpath,"r")
fcontent = file:read()
fcontent = file:read("*all")
file:close()
fcontent = string.gsub(
fcontent,

View File

@@ -24,7 +24,7 @@ data _null_;
put ' ';
put '-- open file and perform the substitution ';
put 'file = io.open(fpath,"r") ';
put 'fcontent = file:read() ';
put 'fcontent = file:read("*all") ';
put 'file:close() ';
put 'fcontent = string.gsub( ';
put ' fcontent, ';
@@ -39,6 +39,6 @@ data _null_;
put 'io.close(file) ';
run;
%inc "%sysfunc(pathname(work))/ml_gsubfile.lua";
%inc "%sysfunc(pathname(work))/ml_gsubfile.lua" /source2;
%mend ml_gsubfile;

View File

@@ -389,6 +389,6 @@ data _null_;
put '-- JSON.LUA ENDS HERE ';
run;
%inc "%sysfunc(pathname(work))/ml_json.lua";
%inc "%sysfunc(pathname(work))/ml_json.lua" /source2;
%mend ml_json;