rejetto forum

Empty lines

Guest · 10 · 4226

0 Members and 1 Guest are viewing this topic.

Deian Pyrvanov Damianov

  • Guest
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!


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
Please post an example of code causing you problem


Offline KillerBG

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
    • http://killerbg.myftp.org/
<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.
You can't stop me, I'm coming for you and your soul is at the death's door...


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
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.


Offline KillerBG

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
    • http://killerbg.myftp.org/
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
You can't stop me, I'm coming for you and your soul is at the death's door...


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
ok, try this then

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



i don't think {::} can solve your problem.


Offline KillerBG

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
    • http://killerbg.myftp.org/
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
You can't stop me, I'm coming for you and your soul is at the death's door...


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
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. ;)


Offline KillerBG

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
    • http://killerbg.myftp.org/
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>
You can't stop me, I'm coming for you and your soul is at the death's door...


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
<div>
{.if | {.?x.} |{:<a href="somewhere">Link</a>
:}.}</div>