[TxMt] TM_CURRENT_LINE broken variable content

Allan Odgaard throw-away-1 at macromates.com
Wed Nov 1 19:19:24 UTC 2006


On 1. Nov 2006, at 18:41, marios wrote:

> I am having trouble with the Dynamic variables, not sure, what is  
> going on.
> Here are some test-strings of current lines, and the wrong output I  
> get
> from this variable, instead of the whole string, using the Show
> TM_VARIABLES command.
>
> 1) <li <txp:zem_nth step=1
> of=2>class="odd"</txp:zem_nth>><txp:linkdesctitle /></li>
>
> $TM_CURRENT_LINE echoes: [CSS-bullet] class="odd">

You’re saying that if you paste the above line into a new document,  
place caret on that line, and invoces Show Variables, you only see  
“[CSS-bullet] class="odd">”?

> 2) <txp:if_article_category></txp:if_article_category>
>
> ouput: nil

nil? Okay, so this is _not_ using Show Variables, right? Could you  
paste the code that you are using to dump the variable.

> [...] It seems, that any HTML brackets will just strip the content  
> off, from
> the variables.

HTML output? Yes, if you output something with <…> and have the  
output option as Show as HTML, that part will not be shown.

You can add ‘|pre’ to your command to have things HTML-escaped.




More information about the textmate mailing list