Comment in macro
Closed this issue · 4 comments
I have a quizz like:
[[!]]
<script> // Something here </script>And I want to make a macro with it. Right now I found no way to have within a macro because macro is inside <!-- comment by itself. Is there an alternative way besides declaring a <!-- for the same? Or maybe some way to escape <!-- for this purpose.
Hi, do you mean something like this:
basically it is possible to use macros with comments within ... LiaScript will parse it correctly, looking only onto the the main comment-tags and greedy consume all comments within. But, other Markdown-renderers will not display it as expected...
Currently there is no escaping for HTML-comments, but in such cases you could also think of using common HTML-tags with some custom styling to achieve the same result:
not sure if this solves your problem ;-) ...
Thank you for explanations and examples! I'm asking because I was getting errors when I was trying it so I thought it is unsupported.
I've just tried your example here
I typed it exactly as you do, but the result I'm seeing is different:
Are there any options in LiveEditor to have it working exactly as it works in your case?
Br/Alexey
You can share your examples via the snapshot-url option, this way the entire course will be included into the url ...
Here is my example ...
From your example, it looks as if something is not fine with the backticks ... It seems to separate parameters by commas and thus only show a as the first parameter, the other ones are not used ...
Ah, I've got the point!
@macro: @another_macro(111,`@0`) - works
@macro: @another_macro(111, `@0`) - fails
Just good to know, it is better to avoid whitespaces when passing macro params.