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

Syntax error when runnig test in Textmate #32

Closed
11factory opened this issue Apr 11, 2012 · 7 comments
Closed

Syntax error when runnig test in Textmate #32

11factory opened this issue Apr 11, 2012 · 7 comments

Comments

@11factory
Copy link

loofah-1.2.0/lib/loofah/html5/scrub.rb:10: too short escaped multibyte character: /`|[\000-\040\177\s]+|\302[\200-\240]/

When I remove the failing line 10, It works!

@flavorjones
Copy link
Owner

I don't understand what Textmate has to do with tests failing ... :(

Can you explain a bit more about what you're seeing? Can you help me reproduce it?

@11factory
Copy link
Author

I'm not talking about failing tests..
When I use textmate to run a test with loofah in my dependencies, there's a 'syntax error' issue.
When I run my test with the terminal, everything is working fine.

To reproduce it:
just make a new rails 3.2.1 project with ruby 1.9.2-p290 and the loofah gem and try to run a unit test within textmate.

@flavorjones
Copy link
Owner

I run Linux, and don't have access to a Mac. Can you help me reproduce this issue some other way?

Is this error coming from TM, or from the version of Ruby that TM execs when running tests?

@11factory
Copy link
Author

I found the issue, I've made a pull request with the fix.

The issue was because Textmate use -KU option to run tests, so it consider 'scrub.rb' as ut8 encoded file which is not the case at line 9.

@flavorjones
Copy link
Owner

Thanks. I've merged the request, and will release an update of Loofah this weekend.

@11factory
Copy link
Author

Thanks !

@flavorjones
Copy link
Owner

Pushed 1.2.1 to rubygems.org. Thanks for using Loofah!

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

No branches or pull requests

2 participants