Sha256: d74cca4fe1f766b4bd39164b8429f409a51e7ff107cff31bb05b44e714fa3a1b
Contents?: true
Size: 590 Bytes
Versions: 12
Compression:
Stored size: 590 Bytes
Contents
# -*- encoding : utf-8 -*- require "coffee-script" include_set Abstract::Script format :html do def ace_mode :coffee end def bare_compile true end end format do def bare_compile false end view :core do compile_coffee _render_raw end def compile_coffee script ::CoffeeScript.compile script, no_wrap: bare_compile rescue StandardError => e line_nr = e.to_s.match(/\[stdin\]:(\d*)/)&.capture(0)&.to_i line = script.lines[line_nr - 1] if line_nr raise Card::Error, "CoffeeScript::Error (#{card.name}): #{e.message}: #{line}" end end
Version data entries
12 entries across 12 versions & 1 rubygems