Mercurial > octave
changeset 22316:b67a29a96056
dump_demos.m: Replace # not inside single quotes
author | Andreas Weber <andy.weber.aw@gmail.com> |
---|---|
date | Tue, 16 Aug 2016 20:43:59 +0200 |
parents | 567c9d9228d4 |
children | 6ca3acf5fad8 |
files | scripts/testfun/private/dump_demos.m |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/testfun/private/dump_demos.m Tue Aug 16 11:31:02 2016 -0700 +++ b/scripts/testfun/private/dump_demos.m Tue Aug 16 20:43:59 2016 +0200 @@ -207,10 +207,8 @@ code = regexprep (code, "[(,;\n][ ]*'[^']*'(*SKIP)(*F)|\"", "'", "lineanchors", "dotexceptnewline"); - code = strrep (code, "#", "%"); # comment character - ## Fix the format specs for the errorbar demos changed by the line above - code = strrep (code, "%r", "#r"); - code = strrep (code, "%~", "#~"); + ## replace # not inside single quotes + code = regexprep (code, "[(,;\n][ ]*'[^']*'(*SKIP)(*F)|#", "%"); ## Shorten all long forms of endXXX to 'end' endkeywords = {"endfor", "endfunction", "endif", "endwhile", "end_try_catch"};