When I want to use the Markdown --> Headings --> Level 1 [setext] / Level 2 [setext] commands, I get the error message "/tmp/temp_textmate.qXjdGq:11: undefined method `rstrip' for nil:NilClass (NoMethodError)".
Textmate is Version 1.5.8 (1505) on Leopard 10.5.7 with the stock ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]. I updated Markdown.tmbundle to r11632 and Support to r11693 but it didn't help.
Any idea what is going wrong here?
The Code of the Headings Command is:
#!/usr/bin/env ruby -wKU
require 'jcode'
# Split document into lines. Get current line number minus one for # previous, minus another for ruby being 0 based. lines = STDIN.readlines line = ENV['TM_LINE_NUMBER'].to_i - 2
# Get length of previous line, using jlength for unicode length = lines[line].rstrip.jlength
# Print same number of = length.times { print "=" }
Regards, Sebastian R.