Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update comment.rb #5

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from
Open

Update comment.rb #5

wants to merge 2 commits into from

Conversation

btsai
Copy link

@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