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:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user