>
> I have a comment/request regarding the optKeepSpaces option.
> I would like to preserve the indentation of some
> javascript code generated by embperl without adding
> empty lines. Here is an example.
>
> --------------------
> function myfunc() {
>     var a=0;
>     [$ if ($flag==1) $]
>     a += 10; b=0;
>     [$ else $]
>     a += 5; b=1;
>     [$ endif $]
> }
>
> ---------------
> Without optKeepSpaces set the output looks like
>
> function myfunc() {
>     var a=0;
>     a += 5; b=1;
>     }
>
> ---------------
> With the optKeepSpaces option:
>
> function myfunc() {
>
>     var a=0;
>
>     a += 5; b=1;
>
> }
> ---------------
>
> Is it possible to have the empty lines removed, but not the spaces
> that were given in the HTML part to get the following output:
>
> function myfunc() {
>     var a=0;
>     a += 5; b=1;
> }
>
>
> I can get this output with optKeepSpaces off, if I move the Embperl code
> accordingly, but it would be nice if that wasn't necessary.
>
> I wonder if this functionality would be something that more people would
> find useful.
>

Of course that could be done, but there are other things on my todo list
with higher priority. If you like to take a look yourself, the removing of
spaces is done in epmain.c at line 817 .

Patches are always welcome

Gerald

P.S. Please use the Embperl mailing list for further questions


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to