Sha256: 0cd59d3e198b8c2ef12a86c0ce00d129100c0a3643306b44f79e719b1faab891
Contents?: true
Size: 1.14 KB
Versions: 3
Compression:
Stored size: 1.14 KB
Contents
require 'uv' module Uv @@set_table_columns = true Uv.syntax_path = File.join(File.dirname(__FILE__), 'syntax') Uv.render_path = File.join(File.dirname(__FILE__), 'render') Uv.theme_path = File.join(File.dirname(__FILE__), 'render', 'latex') Uv.default_style ||= 'moc' def Uv.themes Dir.glob( File.join(@theme_path, '*.render') ).collect do |f| File.basename(f, '.render') end end def start_parsing name @stack = [name] @string = "" @line = nil @line_number = 0 if @@set_table_columns print @render_options["document"]["begin"] if @headers print @render_options["listing"]["begin"] end end def end_parsing name if @line print escape(@line[@position..-1].gsub(/\n|\r/, '')) while @stack.size > 1 opt = options @stack print opt["end"] if opt @stack.pop end print @render_options["line"]["end"] print "\n" end @stack.pop if @@set_table_columns print @render_options["listing"]["end"] print @render_options["document"]["end"] if @headers else @@set_table_columns = false end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
code_rippa-0.0.4 | lib/code_rippa/uv_overrides.rb |
code_rippa-0.0.3 | lib/code_rippa/uv_overrides.rb |
code_rippa-0.0.1 | lib/code_rippa/uv_overrides.rb |