runemadsen / Magic-Book-Project

DEPRECATED: We are reviving the Magic Book project as a node package: https://github.com/magicbookproject/magicbook
http://itp.nyu.edu
620 stars 62 forks source link

SyntaxError: ./helpers/magicrocco.rb:128: undefined (?...) sequence: /(?<code>.*[^\n$])(?<end>\n|$)/ #164

Open kod3000 opened 11 years ago

kod3000 commented 11 years ago

Installing the master branch.. this error shows up..

Screen Shot 2013-04-01 at 12 06 41 AM

It can be fixed by adding missing quotation marks in line 128 of the file ' helpers/magicrocco.rb '

just replace this line

  map { |code| code.gsub(/(?<code>.*[^\n$])(?<end>\n|$)/,"<span class='one-line'>" + '\k<code>' + "</span>" + '\k<end>') }

with this one

  map { |code| code.gsub("/(?<code>.*[^\n$])(?<end>\n|$)/" + "<span class='one-line'>" + '\k<code>' + "</span>" + '\k<end>') }

hope this helps.. this project is magic if you manage to get it working ;)

runemadsen commented 11 years ago

Thanks! If you have time, a pull request would be awesome. This app was started a year ago, and there's probably a few things that need to be tweaked to make it go.