rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: Deian Pyrvanov Damianov on October 10, 2008, 08:23:43 PM

Title: Empty lines
Post by: Deian Pyrvanov Damianov on October 10, 2008, 08:23:43 PM
Will it be possible, please, to remove the empty lines leaved after macro execution with no output or implement a macro function that can do that? They are making the output code ugly looking and generate unneeded traffic. Thanks in advance and congratulations for the great work!
Title: Re: Empty lines
Post by: rejetto on October 10, 2008, 08:35:26 PM
Please post an example of code causing you problem
Title: Re: Empty lines
Post by: KillerBG on October 11, 2008, 07:11:18 AM
<div>
{. if | {. ?some-urlvar .} | <a href="somewhere">Link</a> .}
</div>

will output the lines below when not executed (one empty line per macro)

<div>

</div>

And I have one more little question/advice. The ability to create new folders inside shared real ones will be very comfortable, but I haven't seen this in the to-do-list.
Title: Re: Empty lines
Post by: rejetto on October 11, 2008, 10:21:47 AM
Ok, this code is supposed to solve your problem
<div>{. if | {. ?some-urlvar .} |
   <a href="somewhere">Link</a>.}
</div>

And I have one more little question/advice. The ability to create new folders inside shared real ones will be very comfortable, but I haven't seen this in the to-do-list.

if you mean remotely, this is the line in the to-do-list:
[NEW] folder creation (with upload rights)

if you mean in the HFS window, you can, just try.
Title: Re: Empty lines
Post by: KillerBG on October 13, 2008, 09:25:44 AM
Sorry for the second question, I haven't found the to-do-list entry then.

And for the code... I think this isn't the solution, because it produces

<div><a href="somewhere">Link</a>
</div>

I can insert new line using {: :} , but this is strange transaction
Title: Re: Empty lines
Post by: rejetto on October 13, 2008, 10:07:32 AM
ok, try this then

<div>{. if | {. ?some-urlvar .} |
   <a href="somewhere">Link</a>
.}</div>



i don't think {::} can solve your problem.
Title: Re: Empty lines
Post by: KillerBG on October 13, 2008, 08:35:56 PM
I meaned quoting the new line like this
<div>{. if | {. ?some-urlvar .} | {:
:}<a href="somewhere">Link</a> .}
</div>

The results from
<div>{. if | {. ?some-urlvar .} |
   <a href="somewhere">Link</a>
.}</div>
are scaring:
<div></div>
when no output
and
<div><a href="somewhere">Link</a></div>
otherwise
Title: Re: Empty lines
Post by: rejetto on October 13, 2008, 08:56:22 PM
you didn't specify the output you want,
that's why i'm going trial-and-error.
it will be better if you say it all. ;)
Title: Re: Empty lines
Post by: KillerBG on October 13, 2008, 09:01:04 PM
I just want the macro output code on a new line or nothing like this:

<div>
</div>

or

<div>
<a href="somewhere">Link</a>
</div>
Title: Re: Empty lines
Post by: rejetto on October 13, 2008, 09:38:25 PM
<div>
{.if | {.?x.} |{:<a href="somewhere">Link</a>
:}.}</div>