From: Jason Roelofs Date: 2007-01-24T06:39:49+09:00 Subject: Re: BUG: ruby-mode.el /Today's Comic/ ------=_Part_81423_2169352.1169588384748 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline It buggers up Vim's syntax highlighting as well, not sure how best to fix it, but there is a work-around, the %r{} construct: def image_data src = open("http://www.dilbert.com/").read soup = BeautifulSoup.new(src) url = soup.find('img', { :attrs => { 'alt' => %r{Today's Comic} } }) open("http://www.dilbert.com" + url['src'], "rb").read end Jason On 1/23/07, Weber wrote: > > Hi all > This regexp seems to break ruby-mode parser or something like that (I'm > not an advanced emacs user) > This is the code: > > def image_data > src = open("http://www.dilbert.com/").read > soup = BeautifulSoup.new(src) > url = soup.find('img', { :attrs => { 'alt' => /Today's Comic/ } }) > open("http://www.dilbert.com" + url['src'], "rb").read > end > > I'd appreciate if someone else tried this too. I'm using last version > of ruby-mode.el and Gnu Emacs 22.0.92.1 > > Cheers > -Weber > > > ------=_Part_81423_2169352.1169588384748--