 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
What do you mean by "crashed?" Do you get some kind of an error?
 |
 |
if I remove those line breaks, it should not insert them into the final result, right? But will that not cause macro misinterpretation? |
Correct, it should insert them. The macro is enclosed in $..$ symbols, which mark begging and ending of the macro code within the snippet. Everything else in the snippet code is interpreted literally.
|
|
Mon Sep 27, 2010 9:43 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Yes, I did, but that was expected. After removing line breaks the $s of consecutive PROMPT macros got next to each other (see example below)
 |
 |
$PROMPT(a,a)$$PROMPT(b,b)$$PROMPT(g,g)$$PROMPT(f,f)$$PROMPT(k,k)$
|
forming $$...$$ macros unintentionally. Inserting spaces between them solves that but it looks a bit... 'untidy'. And still does not explain why were there two line breaks instead of one. I tried using PROMPT right where I use its contents but using $a$ immediately after the PROMPT gives another $$...$$ macro and introducing a space between them is unwanted sometimes.
Is there a way (escape sequence perhaps?) to ignore those line breaks after closing $s or having them on the same line is the only solution? I know it's only convenience and code readability but it would be a nice feature.
|
|
Mon Sep 27, 2010 9:55 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
In regard to escape symbols... I asked a similar question earlier today about the code readability and line breaks and didn't get a response yet.
|
|
Mon Sep 27, 2010 10:02 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
So I'm not the only one wishing this? Well sure, there could be other uses of it as well. That's reassuring.
|
|
Mon Sep 27, 2010 10:09 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
For now I bypassed the problem by moving PROMPT macros at the end of my snippetsu. The readability is reduced but it's still better than having them all on the same line and the extra lines are less disturbing there.
EDIT: I withdraw that. It seems that having the PROMPT macro after the first line where its variable is used results in broken code inserted. Should it not evaluate it first and insert it after?
|
|
Mon Sep 27, 2010 4:23 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
The response from development is that, at the moment the snippet execution function doesn't support any magical tricks for inserting line breaks into the snippet code and not carrying them into the editor during code execution. I did ask if it would be possible to implement some sort of an enhancement or an option for entering line breaks in the snippet code for improved readability only and still waiting for a review and reply.
|
|
Mon Sep 27, 2010 11:19 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
That would be nice, thanky you very much.
|
|
Tue Sep 28, 2010 3:45 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|