I'm using the standard heading snippet to automatically add an ID to a heading, like this:
<h3 id="${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}">${1:Some Title}</h3>
But now I want to mirror the transformed ID value in a permalink later in the snippet like this:
<a href="http://somesite/links/#%241%3Epermalink</a>
If I mirror $1 I get the untransformed text.
------------------------------------------------------
Is there a way to mirror transformed tab-stops?
On 2/8/2006, at 21:39, Oliver Taylor wrote:
[...] <h3 id="${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}">${1:Some Title}</ h3>
But now I want to mirror the transformed ID value in a permalink later in the snippet like this:
[...] Is there a way to mirror transformed tab-stops?
No, but you can repeat the transformation:
<h3 id="${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}">${1:Some Title}</h3> … <a href="http://somesite/links/#%24%7B1/%5B%5B:alpha:%5D%5D+%7C( )/(?1:_:\L$0)/ g}>permalink</a>