Code beautifying.
This commit is contained in:
parent
625b47569f
commit
7b7966dbb1
1 changed files with 3 additions and 3 deletions
|
@ -156,14 +156,14 @@
|
||||||
|
|
||||||
<nasal>
|
<nasal>
|
||||||
<open><![CDATA[
|
<open><![CDATA[
|
||||||
var dlg_root = cmdarg().getNode("/");
|
var dlg_root = cmdarg();
|
||||||
|
|
||||||
var normalize_string = func(src) {
|
var normalize_string = func(src) {
|
||||||
if( src == nil ) src = "";
|
if( src == nil ) src = "";
|
||||||
var dst = "";
|
var dst = "";
|
||||||
for( var i = 0; i < size(src); i+=1 ) {
|
for( var i = 0; i < size(src); i+=1 ) {
|
||||||
if( src[i] == 10 or src[i] == 13 )
|
if( src[i] == `\n` or src[i] == `\r` )
|
||||||
src[i] = 32;
|
src[i] = ` `;
|
||||||
|
|
||||||
if( i != 0 and src[i] == 32 and src[i-1] == 32 )
|
if( i != 0 and src[i] == 32 and src[i-1] == 32 )
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue