On 22/3/2006, at 15:50, Niko Dittmann wrote:
$tidy_html = `echo '#{$html}' | ${TM_TIDY:-tidy} -f /dev/null -i - ascii -asxhtml -wrap 0` puts $tidy_html
In that case, you could also call iconv -f iso-8859-1 -t utf-8
But you could also do something like:
puts "<meta http-equiv='Refresh' content='0;URL=#{url}'>"
That should then also save you the trouble of rewriting the relative URLs.
onother refinement: i recorded a macro that does a backward-search for "<", moves the caret 2 bytes to the right and then calls the command. this way you don't have to have the cursor on the html- element. enjoy!
You can also read TM_CURRENT_LINE and TM_LINE_INDEX for the carets position and search back for the tag in code.