kitabu 0.4.7 → 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.gitmodules +3 -0
- data/.rspec +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +62 -0
- data/README.rdoc +187 -0
- data/Rakefile +4 -36
- data/bin/kitabu +2 -5
- data/examples/RailsGuides/config/helper.rb +29 -0
- data/examples/RailsGuides/config/kitabu.yml +48 -0
- data/examples/RailsGuides/images/challenge.png +0 -0
- data/examples/RailsGuides/images/posts_index.png +0 -0
- data/examples/RailsGuides/images/rails_welcome.png +0 -0
- data/examples/RailsGuides/output/RailsGuides.epub +0 -0
- data/examples/RailsGuides/output/RailsGuides.html +1556 -0
- data/examples/RailsGuides/output/RailsGuides.pdf +4930 -7
- data/examples/RailsGuides/templates/cover.erb +16 -0
- data/examples/RailsGuides/templates/layout.css +352 -0
- data/examples/RailsGuides/templates/layout.erb +43 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css/idle.css → examples/RailsGuides/templates/syntax.css} +0 -0
- data/examples/RailsGuides/templates/user.css +19 -0
- data/examples/RailsGuides/text/01_Guide_Assumptions.mkdn +13 -0
- data/examples/RailsGuides/text/02_What_is_Rails.mkdn +106 -0
- data/examples/RailsGuides/text/03_Creating_a_new_Rails_project.mkdn +200 -0
- data/examples/RailsGuides/text/04_Hello_Rails.mkdn +62 -0
- data/examples/RailsGuides/text/05_Getting_Up_and_Running_Quickly_with_Scaffolding.mkdn +4 -0
- data/examples/RailsGuides/text/06_Creating_a_resource.mkdn +503 -0
- data/examples/RailsGuides/text/07_Adding_a_second_model.mkdn +232 -0
- data/examples/RailsGuides/text/08_Refactoring.mkdn +123 -0
- data/examples/RailsGuides/text/09_Deleting_comments.mkdn +57 -0
- data/examples/RailsGuides/text/09_Security.mkdn +56 -0
- data/examples/RailsGuides/text/10_Building_a_multi_model_form.mkdn +130 -0
- data/examples/RailsGuides/text/11_View_helpers.mkdn +50 -0
- data/examples/RailsGuides/text/12_Whats_next.mkdn +14 -0
- data/examples/RailsGuides/text/13_Configuration_gotchas.mkdn +10 -0
- data/kitabu.gemspec +28 -491
- data/lib/kitabu.rb +54 -46
- data/lib/kitabu/cli.rb +88 -0
- data/lib/kitabu/errors.rb +3 -0
- data/lib/kitabu/exporter.rb +81 -0
- data/lib/kitabu/extensions/redcloth.rb +65 -0
- data/lib/kitabu/extensions/string.rb +11 -0
- data/lib/kitabu/generator.rb +74 -0
- data/lib/kitabu/parser.rb +34 -0
- data/lib/kitabu/parser/epub.rb +131 -0
- data/lib/kitabu/parser/html.rb +174 -0
- data/lib/kitabu/parser/mobi.rb +17 -0
- data/lib/kitabu/parser/pdf.rb +41 -0
- data/lib/kitabu/parser/txt.rb +22 -0
- data/lib/kitabu/stream.rb +27 -0
- data/lib/kitabu/syntax.rb +109 -107
- data/lib/kitabu/toc.rb +62 -33
- data/lib/kitabu/version.rb +8 -0
- data/spec/kitabu/cli/export_spec.rb +17 -0
- data/spec/kitabu/cli/new_spec.rb +21 -0
- data/spec/kitabu/cli/permalinks_spec.rb +12 -0
- data/spec/kitabu/cli/version_spec.rb +12 -0
- data/spec/kitabu/extensions/redcloth_spec.rb +52 -0
- data/spec/kitabu/extensions/string_spec.rb +21 -0
- data/spec/kitabu/generator_spec.rb +10 -0
- data/spec/kitabu/parser/epub_spec.rb +10 -0
- data/spec/kitabu/parser/html_spec.rb +75 -0
- data/spec/kitabu/parser/pdf_spec.rb +14 -0
- data/spec/kitabu/syntax_spec.rb +80 -76
- data/spec/kitabu/toc_spec.rb +42 -68
- data/spec/kitabu_spec.rb +4 -0
- data/spec/spec_helper.rb +20 -24
- data/spec/support/exit_with_code.rb +26 -0
- data/spec/support/have_tag.rb +115 -0
- data/spec/support/helper.rb +18 -0
- data/spec/support/mybook/.gitignore +1 -0
- data/spec/support/mybook/code/.gitkeep +0 -0
- data/spec/support/mybook/code/code.rb +13 -0
- data/spec/support/mybook/config/helper.rb +29 -0
- data/spec/support/mybook/config/kitabu.yml +59 -0
- data/spec/support/mybook/images/.gitkeep +0 -0
- data/spec/support/mybook/images/logo.gif +0 -0
- data/spec/support/mybook/output/.gitkeep +0 -0
- data/spec/support/mybook/templates/cover.erb +16 -0
- data/spec/support/mybook/templates/epub.css +1 -0
- data/spec/support/mybook/templates/epub.erb +15 -0
- data/spec/support/mybook/templates/layout.css +137 -0
- data/{templates/layouts/boom/layout.html → spec/support/mybook/templates/layout.erb} +26 -17
- data/{templates/themes/mac_classic.css → spec/support/mybook/templates/syntax.css} +63 -0
- data/spec/support/mybook/templates/user.css +1 -0
- data/spec/support/mybook/text/.gitkeep +0 -0
- data/spec/support/mybook/text/01_Markdown_Chapter.markdown +8 -0
- data/spec/support/mybook/text/02_Textile_Chapter.textile +3 -0
- data/spec/support/mybook/text/03_HTML_Chapter.html +3 -0
- data/spec/support/mybook/text/04_With_Directory/Some_Chapter.mkdn +3 -0
- data/spec/support/mybook/text/CHANGELOG.textile +6 -0
- data/spec/support/mybook/text/TOC.textile +0 -0
- data/spec/support/mybook/text/_00_Introduction.markdown +3 -0
- data/spec/support/shared.rb +16 -0
- data/templates/config.erb +48 -0
- data/templates/cover.erb +16 -0
- data/templates/ebook.png +0 -0
- data/templates/epub.css +0 -0
- data/templates/epub.erb +15 -0
- data/templates/helper.rb +29 -0
- data/templates/layout.css +353 -0
- data/templates/layout.erb +44 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/active4d.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/all_hallows_eve.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/amy.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/blackboard.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/brilliance_black.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/brilliance_dull.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/cobalt.css +0 -0
- data/{lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css → templates/styles}/dawn.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/eiffel.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/espresso_libre.css +0 -0
- data/{lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css → templates/styles}/idle.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/iplastic.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/lazy.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/mac_classic.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/magicwb_amiga.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/pastels_on_dark.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/slush_poppies.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/spacecadet.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/sunburst.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/twilight.css +0 -0
- data/{lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css → templates/styles}/zenburnesque.css +0 -0
- data/templates/user.css +1 -1
- metadata +395 -501
- data/README.markdown +0 -60
- data/VERSION +0 -1
- data/lib/kitabu/base.rb +0 -271
- data/lib/kitabu/blackcloth.rb +0 -184
- data/lib/kitabu/command.rb +0 -94
- data/lib/kitabu/redcloth.rb +0 -964
- data/lib/kitabu/tasks.rb +0 -113
- data/lib/kitabu/templates.rb +0 -54
- data/lib/kitabu/vendor/colorize/colorize.rb +0 -81
- data/lib/kitabu/vendor/ruby1.8/plist/plist.rb +0 -22
- data/lib/kitabu/vendor/ruby1.8/plist/plist/generator.rb +0 -224
- data/lib/kitabu/vendor/ruby1.8/plist/plist/parser.rb +0 -224
- data/lib/kitabu/vendor/ruby1.8/textpow/textpow.rb +0 -10
- data/lib/kitabu/vendor/ruby1.8/textpow/textpow/debug_processor.rb +0 -36
- data/lib/kitabu/vendor/ruby1.8/textpow/textpow/score_manager.rb +0 -65
- data/lib/kitabu/vendor/ruby1.8/textpow/textpow/syntax.rb +0 -284
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/active4d.render +0 -140
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/all_hallows_eve.render +0 -104
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/amy.render +0 -179
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/blackboard.render +0 -119
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/brilliance_black.render +0 -560
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/brilliance_dull.render +0 -569
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/cobalt.render +0 -170
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/dawn.render +0 -134
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/eiffel.render +0 -140
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/espresso_libre.render +0 -131
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/files/css/dawn.css +0 -121
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/idle.render +0 -101
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/iplastic.render +0 -107
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/lazy.render +0 -104
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/mac_classic.render +0 -143
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/magicwb_amiga.render +0 -125
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/pastels_on_dark.render +0 -212
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/slush_poppies.render +0 -131
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/spacecadet.render +0 -89
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/sunburst.render +0 -194
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/twilight.render +0 -161
- data/lib/kitabu/vendor/ruby1.8/uv/render/xhtml/zenburnesque.render +0 -134
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/actionscript.syntax +0 -97
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/active4d.syntax +0 -276
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/active4d_html.syntax +0 -311
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/active4d_ini.syntax +0 -50
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/active4d_library.syntax +0 -21
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/ada.syntax +0 -33
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/antlr.syntax +0 -151
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/apache.syntax +0 -191
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/applescript.syntax +0 -384
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/asp.syntax +0 -70
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/asp_vb.net.syntax +0 -129
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/bibtex.syntax +0 -151
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/blog_html.syntax +0 -41
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/blog_markdown.syntax +0 -42
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/blog_text.syntax +0 -27
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/blog_textile.syntax +0 -27
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/buggy/nemerle.syntax +0 -74
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/build.syntax +0 -53
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/bulletin_board.syntax +0 -287
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/c++.syntax +0 -109
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/c.syntax +0 -326
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/cake.syntax +0 -55
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/camlp4.syntax +0 -36
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/cm.syntax +0 -32
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/coldfusion.syntax +0 -119
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/context_free.syntax +0 -176
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/cs.syntax +0 -59
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/css.syntax +0 -195
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/css_experimental.syntax +0 -1925
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/csv.syntax +0 -68
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/d.syntax +0 -142
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/diff.syntax +0 -81
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/dokuwiki.syntax +0 -204
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/dot.syntax +0 -47
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/doxygen.syntax +0 -43
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/dylan.syntax +0 -62
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/eiffel.syntax +0 -78
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/erlang.syntax +0 -922
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/f-script.syntax +0 -80
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/fortran.syntax +0 -141
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/fxscript.syntax +0 -142
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/greasemonkey.syntax +0 -34
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/gri.syntax +0 -83
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/groovy.syntax +0 -191
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/gtd.syntax +0 -22
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/gtdalt.syntax +0 -143
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/haml.syntax +0 -88
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/haskell.syntax +0 -88
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/html-asp.syntax +0 -27
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/html.syntax +0 -362
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/html_django.syntax +0 -36
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/html_for_asp.net.syntax +0 -424
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/html_mason.syntax +0 -119
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/html_rails.syntax +0 -40
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/html_tcl.syntax +0 -26
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/icalendar.syntax +0 -32
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/inform.syntax +0 -48
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/ini.syntax +0 -55
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/installer_distribution_script.syntax +0 -77
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/io.syntax +0 -81
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/java.syntax +0 -211
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/javaproperties.syntax +0 -20
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/javascript.syntax +0 -256
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/javascript_+_prototype.syntax +0 -72
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/javascript_+_prototype_bracketed.syntax +0 -140
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/jquery_javascript.syntax +0 -114
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/json.syntax +0 -136
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/languagedefinition.syntax +0 -708
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/latex.syntax +0 -566
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/latex_beamer.syntax +0 -41
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/latex_log.syntax +0 -50
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/latex_memoir.syntax +0 -64
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/lexflex.syntax +0 -219
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/lighttpd.syntax +0 -54
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/lilypond.syntax +0 -492
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/lisp.syntax +0 -61
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/literate_haskell.syntax +0 -24
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/logo.syntax +0 -29
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/logtalk.syntax +0 -152
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/lua.syntax +0 -86
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/m.syntax +0 -142
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/macports_portfile.syntax +0 -163
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/mail.syntax +0 -118
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/makefile.syntax +0 -36
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/man.syntax +0 -17
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/markdown.syntax +0 -543
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/mediawiki.syntax +0 -567
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/mel.syntax +0 -92
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/mips.syntax +0 -66
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/mod_perl.syntax +0 -50
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/modula-3.syntax +0 -47
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/moinmoin.syntax +0 -189
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/mootools.syntax +0 -572
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/movable_type.syntax +0 -162
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/multimarkdown.syntax +0 -39
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/objective-c++.syntax +0 -18
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/objective-c.syntax +0 -233
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/ocaml.syntax +0 -764
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/ocamllex.syntax +0 -167
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/ocamlyacc.syntax +0 -184
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/old/YAML.yaml +0 -160
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/old/txt2tags.yaml +0 -139
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/opengl.syntax +0 -14
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/pascal.syntax +0 -77
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/perl.syntax +0 -1115
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/php.syntax +0 -1253
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/plain_text.syntax +0 -32
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/pmwiki.syntax +0 -113
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/postscript.syntax +0 -114
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/processing.syntax +0 -106
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/prolog.syntax +0 -40
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/property_list.syntax +0 -635
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/python.syntax +0 -868
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/python_django.syntax +0 -21
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/qmake_project.syntax +0 -114
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/qt_c++.syntax +0 -26
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/quake3_config.syntax +0 -32
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/r.syntax +0 -81
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/r_console.syntax +0 -16
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/ragel.syntax +0 -201
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/rd_r_documentation.syntax +0 -91
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/regexp.syntax +0 -50
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/regular_expressions_oniguruma.syntax +0 -107
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/regular_expressions_python.syntax +0 -109
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/release_notes.syntax +0 -46
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/remind.syntax +0 -253
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/restructuredtext.syntax +0 -250
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/rez.syntax +0 -80
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/ruby.syntax +0 -1035
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/ruby_experimental.syntax +0 -145
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/ruby_on_rails.syntax +0 -88
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/s5.syntax +0 -69
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/scheme.syntax +0 -347
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/scilab.syntax +0 -41
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/setext.syntax +0 -147
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/shell-unix-generic.syntax +0 -384
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/slate.syntax +0 -149
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/smarty.syntax +0 -63
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/sql.syntax +0 -237
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/sql_rails.syntax +0 -18
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/ssh-config.syntax +0 -33
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/standard_ml.syntax +0 -121
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/strings_file.syntax +0 -39
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/subversion_commit_message.syntax +0 -36
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/sweave.syntax +0 -84
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/swig.syntax +0 -57
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/tcl.syntax +0 -152
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/template_toolkit.syntax +0 -121
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/tex.syntax +0 -86
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/tex_math.syntax +0 -49
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/textile.syntax +0 -215
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/tsv.syntax +0 -50
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/twiki.syntax +0 -241
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/txt2tags.syntax +0 -79
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/vectorscript.syntax +0 -57
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/xhtml_1.0.syntax +0 -4027
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/xml.syntax +0 -180
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/xml_strict.syntax +0 -92
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/xsl.syntax +0 -60
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/yaml.syntax +0 -160
- data/lib/kitabu/vendor/ruby1.8/uv/syntax/yui_javascript.syntax +0 -176
- data/lib/kitabu/vendor/ruby1.8/uv/uv.rb +0 -88
- data/lib/kitabu/vendor/ruby1.8/uv/uv/render_processor.rb +0 -131
- data/lib/kitabu/vendor/ruby1.8/uv/uv/utility.rb +0 -67
- data/lib/kitabu/vendor/ruby1.9/plist/plist.rb +0 -23
- data/lib/kitabu/vendor/ruby1.9/plist/plist/generator.rb +0 -228
- data/lib/kitabu/vendor/ruby1.9/plist/plist/parser.rb +0 -225
- data/lib/kitabu/vendor/ruby1.9/textpow/textpow.rb +0 -10
- data/lib/kitabu/vendor/ruby1.9/textpow/textpow/debug_processor.rb +0 -37
- data/lib/kitabu/vendor/ruby1.9/textpow/textpow/score_manager.rb +0 -66
- data/lib/kitabu/vendor/ruby1.9/textpow/textpow/syntax.rb +0 -286
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/active4d.render +0 -140
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/all_hallows_eve.render +0 -104
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/amy.render +0 -179
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/blackboard.render +0 -119
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/brilliance_black.render +0 -560
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/brilliance_dull.render +0 -569
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/cobalt.render +0 -170
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/dawn.render +0 -134
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/eiffel.render +0 -140
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/espresso_libre.render +0 -131
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/active4d.css +0 -114
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/all_hallows_eve.css +0 -72
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/amy.css +0 -147
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/blackboard.css +0 -88
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/brilliance_black.css +0 -605
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/brilliance_dull.css +0 -599
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/cobalt.css +0 -149
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/eiffel.css +0 -121
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/espresso_libre.css +0 -109
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/iplastic.css +0 -80
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/lazy.css +0 -73
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/mac_classic.css +0 -123
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/magicwb_amiga.css +0 -104
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/pastels_on_dark.css +0 -188
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/slush_poppies.css +0 -85
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/spacecadet.css +0 -51
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/sunburst.css +0 -180
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/twilight.css +0 -137
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/files/css/zenburnesque.css +0 -91
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/idle.render +0 -101
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/iplastic.render +0 -107
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/lazy.render +0 -104
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/mac_classic.render +0 -143
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/magicwb_amiga.render +0 -125
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/pastels_on_dark.render +0 -212
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/slush_poppies.render +0 -131
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/spacecadet.render +0 -89
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/sunburst.render +0 -194
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/twilight.render +0 -161
- data/lib/kitabu/vendor/ruby1.9/uv/render/xhtml/zenburnesque.render +0 -134
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/actionscript.syntax +0 -97
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/active4d.syntax +0 -276
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/active4d_html.syntax +0 -311
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/active4d_ini.syntax +0 -50
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/active4d_library.syntax +0 -21
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/ada.syntax +0 -33
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/antlr.syntax +0 -151
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/apache.syntax +0 -191
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/applescript.syntax +0 -384
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/asp.syntax +0 -70
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/asp_vb.net.syntax +0 -129
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/bibtex.syntax +0 -151
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/blog_html.syntax +0 -41
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/blog_markdown.syntax +0 -42
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/blog_text.syntax +0 -27
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/blog_textile.syntax +0 -27
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/build.syntax +0 -53
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/bulletin_board.syntax +0 -287
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/cake.syntax +0 -55
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/camlp4.syntax +0 -36
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/cm.syntax +0 -32
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/coldfusion.syntax +0 -119
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/context_free.syntax +0 -176
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/cs.syntax +0 -59
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/css.syntax +0 -195
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/css_experimental.syntax +0 -1925
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/csv.syntax +0 -68
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/d.syntax +0 -142
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/diff.syntax +0 -81
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/dokuwiki.syntax +0 -204
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/dot.syntax +0 -47
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/doxygen.syntax +0 -43
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/dylan.syntax +0 -62
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/eiffel.syntax +0 -78
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/erlang.syntax +0 -922
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/f-script.syntax +0 -80
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/fortran.syntax +0 -141
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/fxscript.syntax +0 -142
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/greasemonkey.syntax +0 -34
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/gri.syntax +0 -83
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/groovy.syntax +0 -191
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/gtd.syntax +0 -22
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/gtdalt.syntax +0 -143
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/haml.syntax +0 -88
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/haskell.syntax +0 -88
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/html-asp.syntax +0 -27
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/html.syntax +0 -362
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/html_django.syntax +0 -36
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/html_for_asp.net.syntax +0 -424
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/html_mason.syntax +0 -119
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/html_rails.syntax +0 -40
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/html_tcl.syntax +0 -26
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/icalendar.syntax +0 -32
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/inform.syntax +0 -48
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/ini.syntax +0 -55
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/installer_distribution_script.syntax +0 -77
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/io.syntax +0 -81
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/java.syntax +0 -211
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/javaproperties.syntax +0 -20
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/javascript.syntax +0 -256
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/javascript_+_prototype.syntax +0 -72
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/javascript_+_prototype_bracketed.syntax +0 -140
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/jquery_javascript.syntax +0 -114
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/json.syntax +0 -136
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/languagedefinition.syntax +0 -708
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/latex.syntax +0 -566
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/latex_beamer.syntax +0 -41
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/latex_log.syntax +0 -50
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/latex_memoir.syntax +0 -64
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/lexflex.syntax +0 -219
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/lighttpd.syntax +0 -54
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/lilypond.syntax +0 -492
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/lisp.syntax +0 -61
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/literate_haskell.syntax +0 -24
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/logo.syntax +0 -29
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/logtalk.syntax +0 -152
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/lua.syntax +0 -86
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/m.syntax +0 -142
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/macports_portfile.syntax +0 -163
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/makefile.syntax +0 -36
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/man.syntax +0 -17
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/mediawiki.syntax +0 -567
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/mips.syntax +0 -66
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/mod_perl.syntax +0 -50
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/modula-3.syntax +0 -47
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/moinmoin.syntax +0 -189
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/mootools.syntax +0 -572
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/movable_type.syntax +0 -162
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/multimarkdown.syntax +0 -39
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/objective-c++.syntax +0 -18
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/objective-c.syntax +0 -233
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/ocaml.syntax +0 -764
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/ocamllex.syntax +0 -167
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/ocamlyacc.syntax +0 -184
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/opengl.syntax +0 -14
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/pascal.syntax +0 -77
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/perl.syntax +0 -1115
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/plain_text.syntax +0 -32
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/postscript.syntax +0 -114
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/processing.syntax +0 -106
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/prolog.syntax +0 -40
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/property_list.syntax +0 -635
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/python.syntax +0 -868
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/python_django.syntax +0 -21
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/qmake_project.syntax +0 -114
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/qt_c++.syntax +0 -26
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/quake3_config.syntax +0 -32
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/r.syntax +0 -81
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/r_console.syntax +0 -16
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/ragel.syntax +0 -201
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/rd_r_documentation.syntax +0 -91
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/regexp.syntax +0 -50
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/release_notes.syntax +0 -46
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/remind.syntax +0 -253
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/restructuredtext.syntax +0 -250
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/rez.syntax +0 -80
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/ruby.syntax +0 -1035
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/ruby_experimental.syntax +0 -145
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/ruby_on_rails.syntax +0 -88
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/s5.syntax +0 -69
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/scheme.syntax +0 -347
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/scilab.syntax +0 -41
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/setext.syntax +0 -147
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/shell-unix-generic.syntax +0 -384
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/slate.syntax +0 -149
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/sql.syntax +0 -237
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/sql_rails.syntax +0 -18
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/ssh-config.syntax +0 -33
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/standard_ml.syntax +0 -121
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/strings_file.syntax +0 -39
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/subversion_commit_message.syntax +0 -36
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/sweave.syntax +0 -84
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/swig.syntax +0 -57
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/tcl.syntax +0 -152
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/template_toolkit.syntax +0 -121
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/tex.syntax +0 -86
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/tex_math.syntax +0 -49
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/textile.syntax +0 -215
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/tsv.syntax +0 -50
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/twiki.syntax +0 -241
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/txt2tags.syntax +0 -79
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/vectorscript.syntax +0 -57
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/xhtml_1.0.syntax +0 -4027
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/xml.syntax +0 -180
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/xml_strict.syntax +0 -92
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/xsl.syntax +0 -60
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/yaml.syntax +0 -160
- data/lib/kitabu/vendor/ruby1.9/uv/syntax/yui_javascript.syntax +0 -176
- data/lib/kitabu/vendor/ruby1.9/uv/uv.rb +0 -89
- data/lib/kitabu/vendor/ruby1.9/uv/uv/render_processor.rb +0 -132
- data/lib/kitabu/vendor/ruby1.9/uv/uv/utility.rb +0 -68
- data/spec/exit_matcher.rb +0 -45
- data/spec/fixtures/rails-guides/code/sample.rb +0 -7
- data/spec/kitabu/base_spec.rb +0 -159
- data/spec/kitabu/blackcloth_spec.rb +0 -41
- data/spec/kitabu/bug_fix_spec.rb +0 -25
- data/spec/kitabu/command_spec.rb +0 -82
- data/templates/Rakefile +0 -3
- data/templates/config.yml +0 -9
- data/templates/layouts/boom/layout.css +0 -469
- data/templates/syntax.css +0 -1065
- data/templates/themes/active4d.css +0 -114
- data/templates/themes/blackboard.css +0 -88
- data/templates/themes/dawn.css +0 -121
- data/templates/themes/eiffel.css +0 -121
- data/templates/themes/idle.css +0 -62
- data/templates/themes/iplastic.css +0 -80
- data/templates/themes/lazy.css +0 -73
- data/templates/themes/slush_poppies.css +0 -85
- data/templates/themes/sunburst.css +0 -180
@@ -1,224 +0,0 @@
|
|
1
|
-
#--###########################################################
|
2
|
-
# Copyright 2006, Ben Bleything <ben@bleything.net> and #
|
3
|
-
# Patrick May <patrick@hexane.org> #
|
4
|
-
# #
|
5
|
-
# Distributed under the MIT license. #
|
6
|
-
##############################################################
|
7
|
-
#++
|
8
|
-
# Plist parses Mac OS X xml property list files into ruby data structures.
|
9
|
-
#
|
10
|
-
# === Load a plist file
|
11
|
-
# This is the main point of the library:
|
12
|
-
#
|
13
|
-
# r = Plist::parse_xml( filename_or_xml )
|
14
|
-
module Plist
|
15
|
-
# Note that I don't use these two elements much:
|
16
|
-
#
|
17
|
-
# + Date elements are returned as DateTime objects.
|
18
|
-
# + Data elements are implemented as Tempfiles
|
19
|
-
#
|
20
|
-
# Plist::parse_xml will blow up if it encounters a data element.
|
21
|
-
# If you encounter such an error, or if you have a Date element which
|
22
|
-
# can't be parsed into a Time object, please send your plist file to
|
23
|
-
# plist@hexane.org so that I can implement the proper support.
|
24
|
-
def Plist::parse_xml( filename_or_xml )
|
25
|
-
listener = Listener.new
|
26
|
-
#parser = REXML::Parsers::StreamParser.new(File.new(filename), listener)
|
27
|
-
parser = StreamParser.new(filename_or_xml, listener)
|
28
|
-
parser.parse
|
29
|
-
listener.result
|
30
|
-
end
|
31
|
-
|
32
|
-
class Listener
|
33
|
-
#include REXML::StreamListener
|
34
|
-
|
35
|
-
attr_accessor :result, :open
|
36
|
-
|
37
|
-
def initialize
|
38
|
-
@result = nil
|
39
|
-
@open = Array.new
|
40
|
-
end
|
41
|
-
|
42
|
-
|
43
|
-
def tag_start(name, attributes)
|
44
|
-
@open.push PTag::mappings[name].new
|
45
|
-
end
|
46
|
-
|
47
|
-
def text( contents )
|
48
|
-
@open.last.text = contents if @open.last
|
49
|
-
end
|
50
|
-
|
51
|
-
def tag_end(name)
|
52
|
-
last = @open.pop
|
53
|
-
if @open.empty?
|
54
|
-
@result = last.to_ruby
|
55
|
-
else
|
56
|
-
@open.last.children.push last
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
class StreamParser
|
62
|
-
def initialize( plist_data_or_file, listener )
|
63
|
-
if plist_data_or_file.respond_to? :read
|
64
|
-
@xml = plist_data_or_file.read
|
65
|
-
elsif File.exists? plist_data_or_file
|
66
|
-
@xml = File.read( plist_data_or_file )
|
67
|
-
else
|
68
|
-
@xml = plist_data_or_file
|
69
|
-
end
|
70
|
-
|
71
|
-
@listener = listener
|
72
|
-
end
|
73
|
-
|
74
|
-
TEXT = /([^<]+)/
|
75
|
-
XMLDECL_PATTERN = /<\?xml\s+(.*?)\?>*/um
|
76
|
-
DOCTYPE_PATTERN = /\s*<!DOCTYPE\s+(.*?)(\[|>)/um
|
77
|
-
COMMENT_START = /\A<!--/u
|
78
|
-
COMMENT_END = /.*?-->/um
|
79
|
-
|
80
|
-
|
81
|
-
def parse
|
82
|
-
plist_tags = PTag::mappings.keys.join('|')
|
83
|
-
start_tag = /<(#{plist_tags})([^>]*)>/i
|
84
|
-
end_tag = /<\/(#{plist_tags})[^>]*>/i
|
85
|
-
|
86
|
-
require 'strscan'
|
87
|
-
|
88
|
-
@scanner = StringScanner.new( @xml )
|
89
|
-
until @scanner.eos?
|
90
|
-
if @scanner.scan(COMMENT_START)
|
91
|
-
@scanner.scan(COMMENT_END)
|
92
|
-
elsif @scanner.scan(XMLDECL_PATTERN)
|
93
|
-
elsif @scanner.scan(DOCTYPE_PATTERN)
|
94
|
-
elsif @scanner.scan(start_tag)
|
95
|
-
@listener.tag_start(@scanner[1], nil)
|
96
|
-
if (@scanner[2] =~ /\/$/)
|
97
|
-
@listener.tag_end(@scanner[1])
|
98
|
-
end
|
99
|
-
elsif @scanner.scan(TEXT)
|
100
|
-
@listener.text(@scanner[1])
|
101
|
-
elsif @scanner.scan(end_tag)
|
102
|
-
@listener.tag_end(@scanner[1])
|
103
|
-
else
|
104
|
-
raise "Unimplemented element"
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
class PTag
|
111
|
-
@@mappings = { }
|
112
|
-
def PTag::mappings
|
113
|
-
@@mappings
|
114
|
-
end
|
115
|
-
|
116
|
-
def PTag::inherited( sub_class )
|
117
|
-
key = sub_class.to_s.downcase
|
118
|
-
key.gsub!(/^plist::/, '' )
|
119
|
-
key.gsub!(/^p/, '') unless key == "plist"
|
120
|
-
|
121
|
-
@@mappings[key] = sub_class
|
122
|
-
end
|
123
|
-
|
124
|
-
attr_accessor :text, :children
|
125
|
-
def initialize
|
126
|
-
@children = Array.new
|
127
|
-
end
|
128
|
-
|
129
|
-
def to_ruby
|
130
|
-
raise "Unimplemented: " + self.class.to_s + "#to_ruby on #{self.inspect}"
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
|
-
class PList < PTag
|
135
|
-
def to_ruby
|
136
|
-
children.first.to_ruby if children.first
|
137
|
-
end
|
138
|
-
end
|
139
|
-
|
140
|
-
class PDict < PTag
|
141
|
-
def to_ruby
|
142
|
-
dict = Hash.new
|
143
|
-
key = nil
|
144
|
-
|
145
|
-
children.each do |c|
|
146
|
-
if key.nil?
|
147
|
-
key = c.to_ruby
|
148
|
-
else
|
149
|
-
dict[key] = c.to_ruby
|
150
|
-
key = nil
|
151
|
-
end
|
152
|
-
end
|
153
|
-
|
154
|
-
dict
|
155
|
-
end
|
156
|
-
end
|
157
|
-
|
158
|
-
class PKey < PTag
|
159
|
-
def to_ruby
|
160
|
-
CGI::unescapeHTML(text || '')
|
161
|
-
end
|
162
|
-
end
|
163
|
-
|
164
|
-
class PString < PTag
|
165
|
-
def to_ruby
|
166
|
-
CGI::unescapeHTML(text || '')
|
167
|
-
end
|
168
|
-
end
|
169
|
-
|
170
|
-
class PArray < PTag
|
171
|
-
def to_ruby
|
172
|
-
children.collect do |c|
|
173
|
-
c.to_ruby
|
174
|
-
end
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
class PInteger < PTag
|
179
|
-
def to_ruby
|
180
|
-
text.to_i
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
class PTrue < PTag
|
185
|
-
def to_ruby
|
186
|
-
true
|
187
|
-
end
|
188
|
-
end
|
189
|
-
|
190
|
-
class PFalse < PTag
|
191
|
-
def to_ruby
|
192
|
-
false
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
class PReal < PTag
|
197
|
-
def to_ruby
|
198
|
-
text.to_f
|
199
|
-
end
|
200
|
-
end
|
201
|
-
|
202
|
-
require 'date'
|
203
|
-
class PDate < PTag
|
204
|
-
def to_ruby
|
205
|
-
DateTime.parse(text)
|
206
|
-
end
|
207
|
-
end
|
208
|
-
|
209
|
-
require 'base64'
|
210
|
-
class PData < PTag
|
211
|
-
def to_ruby
|
212
|
-
data = Base64.decode64(text.gsub(/\s+/, ''))
|
213
|
-
|
214
|
-
begin
|
215
|
-
return Marshal.load(data)
|
216
|
-
rescue Exception => e
|
217
|
-
io = StringIO.new
|
218
|
-
io.write data
|
219
|
-
io.rewind
|
220
|
-
return io
|
221
|
-
end
|
222
|
-
end
|
223
|
-
end
|
224
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
module Textpow
|
2
|
-
class DebugProcessor
|
3
|
-
def initialize
|
4
|
-
@line_number = 0
|
5
|
-
@printable_line = ""
|
6
|
-
end
|
7
|
-
|
8
|
-
def pprint line, string, position = 0
|
9
|
-
line.replace line.ljust( position + string.size, " ")
|
10
|
-
line[position,string.size] = string
|
11
|
-
line
|
12
|
-
end
|
13
|
-
|
14
|
-
def open_tag name, position
|
15
|
-
STDERR.puts pprint( "", "{#{name}", position + @line_marks.size)
|
16
|
-
end
|
17
|
-
|
18
|
-
def close_tag name, position
|
19
|
-
STDERR.puts pprint( "", "}#{name}", position + @line_marks.size)
|
20
|
-
end
|
21
|
-
|
22
|
-
def new_line line
|
23
|
-
@line_number += 1
|
24
|
-
@line_marks = "[#{@line_number.to_s.rjust( 4, '0' )}] "
|
25
|
-
STDERR.puts "#{@line_marks}#{line}"
|
26
|
-
end
|
27
|
-
|
28
|
-
def start_parsing name
|
29
|
-
STDERR.puts "{#{name}"
|
30
|
-
end
|
31
|
-
|
32
|
-
def end_parsing name
|
33
|
-
STDERR.puts "}#{name}"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,65 +0,0 @@
|
|
1
|
-
module Textpow
|
2
|
-
class ScoreManager
|
3
|
-
POINT_DEPTH = 4
|
4
|
-
NESTING_DEPTH = 40
|
5
|
-
START_VALUE = 2 ** ( POINT_DEPTH * NESTING_DEPTH )
|
6
|
-
BASE = 2 ** POINT_DEPTH
|
7
|
-
|
8
|
-
def initialize
|
9
|
-
@scores = {}
|
10
|
-
end
|
11
|
-
|
12
|
-
def score search_scope, reference_scope
|
13
|
-
max = 0
|
14
|
-
search_scope.split( ',' ).each do |scope|
|
15
|
-
arrays = scope.split(/\B-/)
|
16
|
-
if arrays.size == 1
|
17
|
-
max = [max, score_term( arrays[0], reference_scope )].max
|
18
|
-
elsif arrays.size > 1
|
19
|
-
excluded = false
|
20
|
-
arrays[1..-1].each do |a|
|
21
|
-
if score_term( arrays[1], reference_scope ) > 0
|
22
|
-
excluded = true
|
23
|
-
break
|
24
|
-
end
|
25
|
-
end
|
26
|
-
max = [max, score_term( arrays[0], reference_scope )].max unless excluded
|
27
|
-
else
|
28
|
-
raise ParsingError, "Error in scope string: '#{search_scope}' #{arrays.size} is not a valid number of operands" if arrays.size < 1
|
29
|
-
end
|
30
|
-
end
|
31
|
-
max
|
32
|
-
end
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
def score_term search_scope, reference_scope
|
37
|
-
unless @scores[reference_scope] && @scores[reference_scope][search_scope]
|
38
|
-
@scores[reference_scope] ||= {}
|
39
|
-
@scores[reference_scope][search_scope] = score_array( search_scope.split(' '), reference_scope.split( ' ' ) )
|
40
|
-
end
|
41
|
-
@scores[reference_scope][search_scope]
|
42
|
-
end
|
43
|
-
|
44
|
-
def score_array search_array, reference_array
|
45
|
-
pending = search_array
|
46
|
-
current = reference_array.last
|
47
|
-
reg = Regexp.new( "^#{Regexp.escape( pending.last )}" )
|
48
|
-
multiplier = START_VALUE
|
49
|
-
result = 0
|
50
|
-
while pending.size > 0 && current
|
51
|
-
if reg =~ current
|
52
|
-
point_score = (2**POINT_DEPTH) - current.count( '.' ) + Regexp.last_match[0].count( '.' )
|
53
|
-
result += point_score * multiplier
|
54
|
-
pending.pop
|
55
|
-
reg = Regexp.new( "^#{Regexp.escape( pending.last )}" ) if pending.size > 0
|
56
|
-
end
|
57
|
-
multiplier = multiplier / BASE
|
58
|
-
reference_array.pop
|
59
|
-
current = reference_array.last
|
60
|
-
end
|
61
|
-
result = 0 if pending.size > 0
|
62
|
-
result
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
@@ -1,284 +0,0 @@
|
|
1
|
-
module Textpow
|
2
|
-
|
3
|
-
class SyntaxProxy
|
4
|
-
def initialize hash, syntax
|
5
|
-
@syntax = syntax
|
6
|
-
@proxy = hash["include"]
|
7
|
-
end
|
8
|
-
|
9
|
-
def method_missing method, *args, &block
|
10
|
-
if @proxy
|
11
|
-
@proxy_value = proxy unless @proxy_value
|
12
|
-
if @proxy_value
|
13
|
-
@proxy_value.send(method, *args, &block)
|
14
|
-
else
|
15
|
-
STDERR.puts "Failed proxying #{@proxy}.#{method}(#{args.join(', ')})"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def proxy
|
21
|
-
case @proxy
|
22
|
-
when /^#/
|
23
|
-
if @syntax.repository && @syntax.repository[@proxy[1..-1]]
|
24
|
-
#puts "Repository"
|
25
|
-
#@table["syntax"].repository.each_key{|k| puts k}
|
26
|
-
return @syntax.repository[@proxy[1..-1]]
|
27
|
-
end
|
28
|
-
when "$self"
|
29
|
-
return @syntax
|
30
|
-
when "$base"
|
31
|
-
return @syntax
|
32
|
-
else
|
33
|
-
return @syntax.syntaxes[@proxy]
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
class SyntaxNode
|
39
|
-
OPTIONS = {:options => Oniguruma::OPTION_CAPTURE_GROUP}
|
40
|
-
|
41
|
-
@@syntaxes = {}
|
42
|
-
|
43
|
-
attr_accessor :syntax
|
44
|
-
attr_accessor :firstLineMatch
|
45
|
-
attr_accessor :foldingStartMarker
|
46
|
-
attr_accessor :foldingStopMarker
|
47
|
-
attr_accessor :match
|
48
|
-
attr_accessor :begin
|
49
|
-
attr_accessor :content
|
50
|
-
attr_accessor :fileTypes
|
51
|
-
attr_accessor :name
|
52
|
-
attr_accessor :contentName
|
53
|
-
attr_accessor :end
|
54
|
-
attr_accessor :scopeName
|
55
|
-
attr_accessor :keyEquivalent
|
56
|
-
attr_accessor :captures
|
57
|
-
attr_accessor :beginCaptures
|
58
|
-
attr_accessor :endCaptures
|
59
|
-
attr_accessor :repository
|
60
|
-
attr_accessor :patterns
|
61
|
-
|
62
|
-
def self.load filename, name_space = :default
|
63
|
-
table = nil
|
64
|
-
case filename
|
65
|
-
when /(\.tmSyntax|\.plist)$/
|
66
|
-
table = Plist::parse_xml( filename )
|
67
|
-
else
|
68
|
-
File.open( filename ) do |f|
|
69
|
-
table = YAML.load( f )
|
70
|
-
end
|
71
|
-
end
|
72
|
-
if table
|
73
|
-
SyntaxNode.new( table, nil, name_space )
|
74
|
-
else
|
75
|
-
nil
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
def initialize hash, syntax = nil, name_space = :default
|
80
|
-
@name_space = name_space
|
81
|
-
@@syntaxes[@name_space] ||= {}
|
82
|
-
@@syntaxes[@name_space][hash["scopeName"]] = self if hash["scopeName"]
|
83
|
-
@syntax = syntax || self
|
84
|
-
hash.each do |key, value|
|
85
|
-
case key
|
86
|
-
when "firstLineMatch", "foldingStartMarker", "foldingStopMarker", "match", "begin"
|
87
|
-
begin
|
88
|
-
instance_variable_set( "@#{key}", Oniguruma::ORegexp.new( value, OPTIONS ) )
|
89
|
-
rescue ArgumentError => e
|
90
|
-
raise ParsingError, "Parsing error in #{value}: #{e.to_s}"
|
91
|
-
end
|
92
|
-
when "content", "fileTypes", "name", "contentName", "end", "scopeName", "keyEquivalent"
|
93
|
-
instance_variable_set( "@#{key}", value )
|
94
|
-
when "captures", "beginCaptures", "endCaptures"
|
95
|
-
instance_variable_set( "@#{key}", value.sort )
|
96
|
-
when "repository"
|
97
|
-
parse_repository value
|
98
|
-
when "patterns"
|
99
|
-
create_children value
|
100
|
-
else
|
101
|
-
STDERR.puts "Ignoring: #{key} => #{value.gsub("\n", "\n>>")}" if $DEBUG
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
|
107
|
-
def syntaxes
|
108
|
-
@@syntaxes[@name_space]
|
109
|
-
end
|
110
|
-
|
111
|
-
def parse( string, processor = nil )
|
112
|
-
processor.start_parsing self.scopeName if processor
|
113
|
-
stack = [[self, nil]]
|
114
|
-
string.each_line do |line|
|
115
|
-
parse_line stack, line, processor
|
116
|
-
end
|
117
|
-
processor.end_parsing self.scopeName if processor
|
118
|
-
processor
|
119
|
-
end
|
120
|
-
|
121
|
-
protected
|
122
|
-
|
123
|
-
def parse_repository repository
|
124
|
-
@repository = {}
|
125
|
-
repository.each do |key, value|
|
126
|
-
if value["include"]
|
127
|
-
@repository[key] = SyntaxProxy.new( value, self.syntax )
|
128
|
-
else
|
129
|
-
@repository[key] = SyntaxNode.new( value, self.syntax, @name_space )
|
130
|
-
end
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
|
-
def create_children patterns
|
135
|
-
@patterns = []
|
136
|
-
patterns.each do |p|
|
137
|
-
if p["include"]
|
138
|
-
@patterns << SyntaxProxy.new( p, self.syntax )
|
139
|
-
else
|
140
|
-
@patterns << SyntaxNode.new( p, self.syntax, @name_space )
|
141
|
-
end
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
def parse_captures name, pattern, match, processor
|
146
|
-
captures = pattern.match_captures( name, match )
|
147
|
-
captures.reject! { |group, range, name| ! range.first || range.first == range.last }
|
148
|
-
starts = []
|
149
|
-
ends = []
|
150
|
-
captures.each do |group, range, name|
|
151
|
-
starts << [range.first, group, name]
|
152
|
-
ends << [range.last, -group, name]
|
153
|
-
end
|
154
|
-
|
155
|
-
# STDERR.puts '-' * 100
|
156
|
-
# starts.sort!.reverse!.each{|c| STDERR.puts c.join(', ')}
|
157
|
-
# STDERR.puts
|
158
|
-
# ends.sort!.reverse!.each{|c| STDERR.puts c.join(', ')}
|
159
|
-
starts.sort!.reverse!
|
160
|
-
ends.sort!.reverse!
|
161
|
-
|
162
|
-
while ! starts.empty? || ! ends.empty?
|
163
|
-
if starts.empty?
|
164
|
-
pos, key, name = ends.pop
|
165
|
-
processor.close_tag name, pos
|
166
|
-
elsif ends.empty?
|
167
|
-
pos, key, name = starts.pop
|
168
|
-
processor.open_tag name, pos
|
169
|
-
elsif ends.last[1].abs < starts.last[1]
|
170
|
-
pos, key, name = ends.pop
|
171
|
-
processor.close_tag name, pos
|
172
|
-
else
|
173
|
-
pos, key, name = starts.pop
|
174
|
-
processor.open_tag name, pos
|
175
|
-
end
|
176
|
-
end
|
177
|
-
end
|
178
|
-
|
179
|
-
def match_captures name, match
|
180
|
-
matches = []
|
181
|
-
captures = instance_variable_get "@#{name}"
|
182
|
-
if captures
|
183
|
-
captures.each do |key, value|
|
184
|
-
if key =~ /^\d*$/
|
185
|
-
matches << [key.to_i, match.offset( key.to_i ), value["name"]] if key.to_i < match.size
|
186
|
-
else
|
187
|
-
matches << [match.to_index( key.to_sym ), match.offset( key.to_sym), value["name"]] if match.to_index( key.to_sym )
|
188
|
-
end
|
189
|
-
end
|
190
|
-
end
|
191
|
-
matches
|
192
|
-
end
|
193
|
-
|
194
|
-
def match_first string, position
|
195
|
-
if self.match
|
196
|
-
if match = self.match.match( string, position )
|
197
|
-
return [self, match]
|
198
|
-
end
|
199
|
-
elsif self.begin
|
200
|
-
if match = self.begin.match( string, position )
|
201
|
-
return [self, match]
|
202
|
-
end
|
203
|
-
elsif self.end
|
204
|
-
else
|
205
|
-
return match_first_son( string, position )
|
206
|
-
end
|
207
|
-
nil
|
208
|
-
end
|
209
|
-
|
210
|
-
def match_end string, match, position
|
211
|
-
regstring = self.end.clone
|
212
|
-
regstring.gsub!( /\\([1-9])/ ) { |s| match[$1.to_i] }
|
213
|
-
regstring.gsub!( /\\k<(.*?)>/ ) { |s| match[$1.to_sym] }
|
214
|
-
Oniguruma::ORegexp.new( regstring ).match( string, position )
|
215
|
-
end
|
216
|
-
|
217
|
-
def match_first_son string, position
|
218
|
-
match = nil
|
219
|
-
if self.patterns
|
220
|
-
self.patterns.each do |p|
|
221
|
-
tmatch = p.match_first string, position
|
222
|
-
if tmatch
|
223
|
-
if ! match || match[1].offset.first > tmatch[1].offset.first
|
224
|
-
match = tmatch
|
225
|
-
end
|
226
|
-
#break if tmatch[1].offset.first == position
|
227
|
-
end
|
228
|
-
end
|
229
|
-
end
|
230
|
-
match
|
231
|
-
end
|
232
|
-
|
233
|
-
def parse_line stack, line, processor
|
234
|
-
processor.new_line line if processor
|
235
|
-
top, match = stack.last
|
236
|
-
position = 0
|
237
|
-
#@ln ||= 0
|
238
|
-
#@ln += 1
|
239
|
-
#STDERR.puts @ln
|
240
|
-
while true
|
241
|
-
if top.patterns
|
242
|
-
pattern, pattern_match = top.match_first_son line, position
|
243
|
-
else
|
244
|
-
pattern, pattern_match = nil
|
245
|
-
end
|
246
|
-
|
247
|
-
end_match = nil
|
248
|
-
if top.end
|
249
|
-
end_match = top.match_end( line, match, position )
|
250
|
-
end
|
251
|
-
|
252
|
-
if end_match && ( ! pattern_match || pattern_match.offset.first >= end_match.offset.first )
|
253
|
-
pattern_match = end_match
|
254
|
-
start_pos = pattern_match.offset.first
|
255
|
-
end_pos = pattern_match.offset.last
|
256
|
-
processor.close_tag top.contentName, start_pos if top.contentName && processor
|
257
|
-
parse_captures "captures", top, pattern_match, processor if processor
|
258
|
-
parse_captures "endCaptures", top, pattern_match, processor if processor
|
259
|
-
processor.close_tag top.name, end_pos if top.name && processor
|
260
|
-
stack.pop
|
261
|
-
top, match = stack.last
|
262
|
-
else
|
263
|
-
break unless pattern
|
264
|
-
start_pos = pattern_match.offset.first
|
265
|
-
end_pos = pattern_match.offset.last
|
266
|
-
if pattern.begin
|
267
|
-
processor.open_tag pattern.name, start_pos if pattern.name && processor
|
268
|
-
parse_captures "captures", pattern, pattern_match, processor if processor
|
269
|
-
parse_captures "beginCaptures", pattern, pattern_match, processor if processor
|
270
|
-
processor.open_tag pattern.contentName, end_pos if pattern.contentName && processor
|
271
|
-
top = pattern
|
272
|
-
match = pattern_match
|
273
|
-
stack << [top, match]
|
274
|
-
elsif pattern.match
|
275
|
-
processor.open_tag pattern.name, start_pos if pattern.name && processor
|
276
|
-
parse_captures "captures", pattern, pattern_match, processor if processor
|
277
|
-
processor.close_tag pattern.name, end_pos if pattern.name && processor
|
278
|
-
end
|
279
|
-
end
|
280
|
-
position = end_pos
|
281
|
-
end
|
282
|
-
end
|
283
|
-
end
|
284
|
-
end
|