Skip to content

Update comment.rb#5

Open
btsai wants to merge 2 commits intoaptana:stablefrom
btsai:patch-1
Open

Update comment.rb#5
btsai wants to merge 2 commits intoaptana:stablefrom
btsai:patch-1

Conversation

@btsai
Copy link
Copy Markdown

@btsai btsai commented Mar 28, 2013

It looks like source.ruble/lib/comment.rb is missing some code.

Change line 218 from:
index = l.index(/\S/)

to:
index = @disable_indent ? 0 : l.index(/\S/)

Then in your language bundle (like ruby.ruble/bundle.rb or js.ruble/bundle.rb), in the block:
env 'source.ruby' do |e|

add:
e['TM_COMMENT_DISABLE_INDENT'] = 'YES'

Personally, to avoid any problems with the wrong value being passed in for TM_COMMENT_DISABLE_INDENT, I would also change line 8 of source.ruble/lib/comment.rb from:
@disable_indent = (disable_indent == 'YES')

to:
@disable_indent = (disable_indent.downcase == 'yes')

It looks like source.ruble/lib/comment.rb is missing some code.

Change line 218 from:
index = l.index(/\S/)

to:
index = @disable_indent ? 0 : l.index(/\S/)

Then in your language bundle (like ruby.ruble/bundle.rb or js.ruble/bundle.rb), in the block: 
env 'source.ruby' do |e|

add:
e['TM_COMMENT_DISABLE_INDENT'] = 'YES'

Personally, to avoid any problems with the wrong value being passed in for TM_COMMENT_DISABLE_INDENT, I would also change line 8 of source.ruble/lib/comment.rb from:
    @disable_indent = (disable_indent == 'YES')

to:
    @disable_indent = (disable_indent.downcase == 'yes')
@btsai btsai mentioned this pull request Mar 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant