ad2games-ui_components 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +28 -0
- data/app/assets/javascripts/ui_components.js.erb +26 -0
- data/app/assets/javascripts/ui_components/chosen_init.coffee +9 -0
- data/app/assets/javascripts/ui_components/domchange.coffee +1 -0
- data/app/assets/javascripts/ui_components/hide_empty_dropdowns.coffee +4 -0
- data/app/assets/javascripts/ui_components/modal.coffee +1 -0
- data/app/assets/javascripts/ui_components/navbar.coffee +2 -0
- data/app/assets/javascripts/ui_components/sticky_header.coffee +24 -0
- data/app/assets/javascripts/ui_components/submit_on_change.coffee +3 -0
- data/app/assets/javascripts/ui_components/turbolinks_progressbar.coffee +2 -0
- data/app/assets/stylesheets/a2g_ui_components.scss +8 -0
- data/app/assets/stylesheets/default_theme/button.scss +160 -0
- data/app/assets/stylesheets/default_theme/common.scss +15 -0
- data/app/assets/stylesheets/default_theme/footer.scss +7 -0
- data/app/assets/stylesheets/default_theme/form.scss +72 -0
- data/app/assets/stylesheets/default_theme/navbar.scss +55 -0
- data/app/assets/stylesheets/default_theme/table.scss +68 -0
- data/app/assets/stylesheets/default_theme/toolbar.scss +117 -0
- data/app/assets/stylesheets/libs.scss +6 -0
- data/app/assets/stylesheets/ui_components.scss.erb +15 -0
- data/app/assets/stylesheets/ui_components/checkbox_list.scss +11 -0
- data/app/assets/stylesheets/ui_components/date_range.scss +5 -0
- data/app/assets/stylesheets/ui_components/markdown_textarea.scss +7 -0
- data/app/assets/stylesheets/variables.scss +893 -0
- data/app/cells/checkbox_list/checkbox_list.yml +7 -0
- data/app/cells/checkbox_list/checkbox_list_cell.rb +33 -0
- data/app/cells/datagrid_filter/datagrid_filter.yml +14 -0
- data/app/cells/datagrid_filter/datagrid_filter_cell.rb +35 -0
- data/app/cells/date_range/date_range.coffee +69 -0
- data/app/cells/date_range/date_range.yml +7 -0
- data/app/cells/date_range/date_range_cell.rb +55 -0
- data/app/cells/form_cell_base.rb +26 -0
- data/app/cells/hello_world/hello_world.slim +1 -0
- data/app/cells/hello_world/hello_world.yml +5 -0
- data/app/cells/hello_world/hello_world_cell.rb +4 -0
- data/app/cells/markdown_readonly/markdown_readonly.coffee +5 -0
- data/app/cells/markdown_readonly/markdown_readonly.slim +1 -0
- data/app/cells/markdown_readonly/markdown_readonly.yml +4 -0
- data/app/cells/markdown_readonly/markdown_readonly_cell.rb +4 -0
- data/app/cells/markdown_textarea/markdown_textarea.coffee +9 -0
- data/app/cells/markdown_textarea/markdown_textarea.slim +9 -0
- data/app/cells/markdown_textarea/markdown_textarea.yml +8 -0
- data/app/cells/markdown_textarea/markdown_textarea_cell.rb +42 -0
- data/app/cells/modal/modal.coffee +2 -0
- data/app/cells/modal/modal.slim +12 -0
- data/app/cells/modal/modal.yml +22 -0
- data/app/cells/modal/modal_cell.rb +31 -0
- data/app/cells/select/select.coffee +35 -0
- data/app/cells/select/select.yml +14 -0
- data/app/cells/select/select_cell.rb +59 -0
- data/app/helpers/ui_components/view_helper.rb +8 -0
- data/lib/generators/generate_component.thor +32 -0
- data/lib/tasks/styleguide.rake +8 -0
- data/lib/ui_components.rb +14 -0
- data/lib/ui_components/cell.rb +16 -0
- data/lib/ui_components/cell_attributes.rb +49 -0
- data/lib/ui_components/docu_cop.rb +31 -0
- data/lib/ui_components/engine.rb +26 -0
- data/lib/ui_components/form_helper.rb +32 -0
- data/lib/ui_components/templates/cell.tt +2 -0
- data/lib/ui_components/templates/coffee.tt +0 -0
- data/lib/ui_components/templates/config.tt +9 -0
- data/lib/ui_components/templates/sass.tt +0 -0
- data/lib/ui_components/templates/view.tt +0 -0
- data/vendor/assets/bower_components/ajax-chosen/CHANGELOG.md +10 -0
- data/vendor/assets/bower_components/ajax-chosen/Cakefile +93 -0
- data/vendor/assets/bower_components/ajax-chosen/Makefile +2 -0
- data/vendor/assets/bower_components/ajax-chosen/README.md +131 -0
- data/vendor/assets/bower_components/ajax-chosen/VERSION +1 -0
- data/vendor/assets/bower_components/ajax-chosen/bower.json +23 -0
- data/vendor/assets/bower_components/ajax-chosen/data.json +57 -0
- data/vendor/assets/bower_components/ajax-chosen/docs/ajax-chosen.html +71 -0
- data/vendor/assets/bower_components/ajax-chosen/docs/docco.css +186 -0
- data/vendor/assets/bower_components/ajax-chosen/index.html +47 -0
- data/vendor/assets/bower_components/ajax-chosen/lib/ajax-chosen.js +159 -0
- data/vendor/assets/bower_components/ajax-chosen/lib/ajax-chosen.min.js +17 -0
- data/vendor/assets/bower_components/ajax-chosen/package.json +18 -0
- data/vendor/assets/bower_components/ajax-chosen/src/ajax-chosen.coffee +183 -0
- data/vendor/assets/bower_components/bootstrap-chosen/README.md +29 -0
- data/vendor/assets/bower_components/bootstrap-chosen/bootstrap-chosen-variables.less +24 -0
- data/vendor/assets/bower_components/bootstrap-chosen/bootstrap-chosen-variables.scss +16 -0
- data/vendor/assets/bower_components/bootstrap-chosen/bootstrap-chosen.less +473 -0
- data/vendor/assets/bower_components/bootstrap-chosen/bootstrap-chosen.scss +459 -0
- data/vendor/assets/bower_components/bootstrap-chosen/bower.json +25 -0
- data/vendor/assets/bower_components/bootstrap-chosen/chosen-sprite.png +0 -0
- data/vendor/assets/bower_components/bootstrap-chosen/chosen-sprite@2x.png +0 -0
- data/vendor/assets/bower_components/bootstrap-daterangepicker/README.md +200 -0
- data/vendor/assets/bower_components/bootstrap-daterangepicker/bower.json +20 -0
- data/vendor/assets/bower_components/bootstrap-daterangepicker/daterangepicker-bs2.css +303 -0
- data/vendor/assets/bower_components/bootstrap-daterangepicker/daterangepicker-bs3.css +335 -0
- data/vendor/assets/bower_components/bootstrap-daterangepicker/daterangepicker.js +1348 -0
- data/vendor/assets/bower_components/bootstrap-daterangepicker/examples.html +272 -0
- data/vendor/assets/bower_components/bootstrap-daterangepicker/package.js +18 -0
- data/vendor/assets/bower_components/bootstrap-daterangepicker/package.json +32 -0
- data/vendor/assets/bower_components/chosen/bower.json +50 -0
- data/vendor/assets/bower_components/chosen/chosen-sprite.png +0 -0
- data/vendor/assets/bower_components/chosen/chosen-sprite@2x.png +0 -0
- data/vendor/assets/bower_components/chosen/chosen.css +448 -0
- data/vendor/assets/bower_components/chosen/chosen.jquery.js +1272 -0
- data/vendor/assets/bower_components/highlightjs/LICENSE +24 -0
- data/vendor/assets/bower_components/highlightjs/Makefile +21 -0
- data/vendor/assets/bower_components/highlightjs/README.md +12 -0
- data/vendor/assets/bower_components/highlightjs/bower.json +14 -0
- data/vendor/assets/bower_components/highlightjs/component.json +12 -0
- data/vendor/assets/bower_components/highlightjs/composer.json +26 -0
- data/vendor/assets/bower_components/highlightjs/highlight.pack.js +15263 -0
- data/vendor/assets/bower_components/highlightjs/highlight.pack.min.js +12 -0
- data/vendor/assets/bower_components/highlightjs/package.json +8 -0
- data/vendor/assets/bower_components/highlightjs/styles/agate.css +108 -0
- data/vendor/assets/bower_components/highlightjs/styles/androidstudio.css +66 -0
- data/vendor/assets/bower_components/highlightjs/styles/arduino-light.css +88 -0
- data/vendor/assets/bower_components/highlightjs/styles/arta.css +73 -0
- data/vendor/assets/bower_components/highlightjs/styles/ascetic.css +45 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-cave-dark.css +83 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-cave-light.css +85 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-cave.dark.css +113 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-cave.light.css +113 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-dune-dark.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-dune-light.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-dune.dark.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-dune.light.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-estuary-dark.css +84 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-estuary-light.css +84 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-estuary.dark.css +113 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-estuary.light.css +113 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-forest-dark.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-forest-light.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-forest.dark.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-forest.light.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-heath-dark.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-heath-light.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-heath.dark.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-heath.light.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-lakeside-dark.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-lakeside-light.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-lakeside.dark.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-lakeside.light.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-plateau-dark.css +84 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-plateau-light.css +84 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-plateau.dark.css +113 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-plateau.light.css +113 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-savanna-dark.css +84 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-savanna-light.css +84 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-savanna.dark.css +113 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-savanna.light.css +113 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-seaside-dark.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-seaside-light.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-seaside.dark.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-seaside.light.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-sulphurpool-dark.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-sulphurpool-light.css +69 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-sulphurpool.dark.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/atelier-sulphurpool.light.css +94 -0
- data/vendor/assets/bower_components/highlightjs/styles/brown-paper.css +64 -0
- data/vendor/assets/bower_components/highlightjs/styles/brown-papersq.png +0 -0
- data/vendor/assets/bower_components/highlightjs/styles/brown_paper.css +103 -0
- data/vendor/assets/bower_components/highlightjs/styles/brown_papersq.png +0 -0
- data/vendor/assets/bower_components/highlightjs/styles/codepen-embed.css +60 -0
- data/vendor/assets/bower_components/highlightjs/styles/color-brewer.css +71 -0
- data/vendor/assets/bower_components/highlightjs/styles/dark.css +63 -0
- data/vendor/assets/bower_components/highlightjs/styles/darkula.css +74 -0
- data/vendor/assets/bower_components/highlightjs/styles/default.css +99 -0
- data/vendor/assets/bower_components/highlightjs/styles/docco.css +97 -0
- data/vendor/assets/bower_components/highlightjs/styles/dracula.css +76 -0
- data/vendor/assets/bower_components/highlightjs/styles/far.css +71 -0
- data/vendor/assets/bower_components/highlightjs/styles/foundation.css +88 -0
- data/vendor/assets/bower_components/highlightjs/styles/github-gist.css +71 -0
- data/vendor/assets/bower_components/highlightjs/styles/github.css +99 -0
- data/vendor/assets/bower_components/highlightjs/styles/googlecode.css +89 -0
- data/vendor/assets/bower_components/highlightjs/styles/grayscale.css +101 -0
- data/vendor/assets/bower_components/highlightjs/styles/gruvbox-dark.css +108 -0
- data/vendor/assets/bower_components/highlightjs/styles/gruvbox-light.css +108 -0
- data/vendor/assets/bower_components/highlightjs/styles/hopscotch.css +83 -0
- data/vendor/assets/bower_components/highlightjs/styles/hybrid.css +102 -0
- data/vendor/assets/bower_components/highlightjs/styles/idea.css +97 -0
- data/vendor/assets/bower_components/highlightjs/styles/ir-black.css +73 -0
- data/vendor/assets/bower_components/highlightjs/styles/ir_black.css +106 -0
- data/vendor/assets/bower_components/highlightjs/styles/kimbie.dark.css +74 -0
- data/vendor/assets/bower_components/highlightjs/styles/kimbie.light.css +74 -0
- data/vendor/assets/bower_components/highlightjs/styles/magula.css +70 -0
- data/vendor/assets/bower_components/highlightjs/styles/mono-blue.css +59 -0
- data/vendor/assets/bower_components/highlightjs/styles/monokai-sublime.css +83 -0
- data/vendor/assets/bower_components/highlightjs/styles/monokai.css +70 -0
- data/vendor/assets/bower_components/highlightjs/styles/monokai_sublime.css +154 -0
- data/vendor/assets/bower_components/highlightjs/styles/obsidian.css +88 -0
- data/vendor/assets/bower_components/highlightjs/styles/paraiso-dark.css +72 -0
- data/vendor/assets/bower_components/highlightjs/styles/paraiso-light.css +72 -0
- data/vendor/assets/bower_components/highlightjs/styles/paraiso.dark.css +96 -0
- data/vendor/assets/bower_components/highlightjs/styles/paraiso.light.css +96 -0
- data/vendor/assets/bower_components/highlightjs/styles/pojoaque.css +83 -0
- data/vendor/assets/bower_components/highlightjs/styles/pojoaque.jpg +0 -0
- data/vendor/assets/bower_components/highlightjs/styles/qtcreator_dark.css +83 -0
- data/vendor/assets/bower_components/highlightjs/styles/qtcreator_light.css +83 -0
- data/vendor/assets/bower_components/highlightjs/styles/railscasts.css +106 -0
- data/vendor/assets/bower_components/highlightjs/styles/rainbow.css +85 -0
- data/vendor/assets/bower_components/highlightjs/styles/school-book.css +72 -0
- data/vendor/assets/bower_components/highlightjs/styles/school-book.png +0 -0
- data/vendor/assets/bower_components/highlightjs/styles/school_book.css +111 -0
- data/vendor/assets/bower_components/highlightjs/styles/school_book.png +0 -0
- data/vendor/assets/bower_components/highlightjs/styles/solarized-dark.css +84 -0
- data/vendor/assets/bower_components/highlightjs/styles/solarized-light.css +84 -0
- data/vendor/assets/bower_components/highlightjs/styles/solarized_dark.css +107 -0
- data/vendor/assets/bower_components/highlightjs/styles/solarized_light.css +107 -0
- data/vendor/assets/bower_components/highlightjs/styles/sunburst.css +102 -0
- data/vendor/assets/bower_components/highlightjs/styles/tomorrow-night-blue.css +75 -0
- data/vendor/assets/bower_components/highlightjs/styles/tomorrow-night-bright.css +74 -0
- data/vendor/assets/bower_components/highlightjs/styles/tomorrow-night-eighties.css +74 -0
- data/vendor/assets/bower_components/highlightjs/styles/tomorrow-night.css +75 -0
- data/vendor/assets/bower_components/highlightjs/styles/tomorrow.css +72 -0
- data/vendor/assets/bower_components/highlightjs/styles/vs.css +68 -0
- data/vendor/assets/bower_components/highlightjs/styles/xcode.css +93 -0
- data/vendor/assets/bower_components/highlightjs/styles/zenburn.css +80 -0
- data/vendor/assets/bower_components/jquery.floatThead/CONTRIBUTING.md +33 -0
- data/vendor/assets/bower_components/jquery.floatThead/README.md +285 -0
- data/vendor/assets/bower_components/jquery.floatThead/bower.json +34 -0
- data/vendor/assets/bower_components/jquery.floatThead/dist/jquery.floatThead-slim.js +899 -0
- data/vendor/assets/bower_components/jquery.floatThead/dist/jquery.floatThead-slim.min.js +3 -0
- data/vendor/assets/bower_components/jquery.floatThead/dist/jquery.floatThead.js +964 -0
- data/vendor/assets/bower_components/jquery.floatThead/dist/jquery.floatThead.min.js +3 -0
- data/vendor/assets/bower_components/jquery.floatThead/license.txt +21 -0
- data/vendor/assets/bower_components/jquery/AUTHORS.txt +278 -0
- data/vendor/assets/bower_components/jquery/LICENSE.txt +36 -0
- data/vendor/assets/bower_components/jquery/README.md +65 -0
- data/vendor/assets/bower_components/jquery/bower.json +14 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.js +9842 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.min.js +4 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.min.map +1 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.slim.js +7877 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.slim.min.js +4 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.slim.min.map +1 -0
- data/vendor/assets/bower_components/jquery/sizzle/LICENSE.txt +36 -0
- data/vendor/assets/bower_components/jquery/sizzle/dist/sizzle.js +2143 -0
- data/vendor/assets/bower_components/jquery/sizzle/dist/sizzle.min.js +3 -0
- data/vendor/assets/bower_components/jquery/sizzle/dist/sizzle.min.map +1 -0
- data/vendor/assets/bower_components/jquery/src/ajax.js +845 -0
- data/vendor/assets/bower_components/jquery/src/ajax/jsonp.js +100 -0
- data/vendor/assets/bower_components/jquery/src/ajax/load.js +83 -0
- data/vendor/assets/bower_components/jquery/src/ajax/parseJSON.js +13 -0
- data/vendor/assets/bower_components/jquery/src/ajax/parseXML.js +27 -0
- data/vendor/assets/bower_components/jquery/src/ajax/script.js +68 -0
- data/vendor/assets/bower_components/jquery/src/ajax/var/location.js +3 -0
- data/vendor/assets/bower_components/jquery/src/ajax/var/nonce.js +5 -0
- data/vendor/assets/bower_components/jquery/src/ajax/var/rquery.js +3 -0
- data/vendor/assets/bower_components/jquery/src/ajax/xhr.js +167 -0
- data/vendor/assets/bower_components/jquery/src/attributes.js +11 -0
- data/vendor/assets/bower_components/jquery/src/attributes/attr.js +142 -0
- data/vendor/assets/bower_components/jquery/src/attributes/classes.js +177 -0
- data/vendor/assets/bower_components/jquery/src/attributes/prop.js +125 -0
- data/vendor/assets/bower_components/jquery/src/attributes/support.js +36 -0
- data/vendor/assets/bower_components/jquery/src/attributes/val.js +177 -0
- data/vendor/assets/bower_components/jquery/src/callbacks.js +232 -0
- data/vendor/assets/bower_components/jquery/src/core.js +494 -0
- data/vendor/assets/bower_components/jquery/src/core/DOMEval.js +14 -0
- data/vendor/assets/bower_components/jquery/src/core/access.js +65 -0
- data/vendor/assets/bower_components/jquery/src/core/init.js +134 -0
- data/vendor/assets/bower_components/jquery/src/core/parseHTML.js +41 -0
- data/vendor/assets/bower_components/jquery/src/core/ready.js +103 -0
- data/vendor/assets/bower_components/jquery/src/core/support.js +18 -0
- data/vendor/assets/bower_components/jquery/src/core/var/rsingleTag.js +5 -0
- data/vendor/assets/bower_components/jquery/src/css.js +515 -0
- data/vendor/assets/bower_components/jquery/src/css/addGetHookIf.js +24 -0
- data/vendor/assets/bower_components/jquery/src/css/adjustCSS.js +65 -0
- data/vendor/assets/bower_components/jquery/src/css/curCSS.js +60 -0
- data/vendor/assets/bower_components/jquery/src/css/defaultDisplay.js +72 -0
- data/vendor/assets/bower_components/jquery/src/css/hiddenVisibleSelectors.js +18 -0
- data/vendor/assets/bower_components/jquery/src/css/showHide.js +48 -0
- data/vendor/assets/bower_components/jquery/src/css/support.js +121 -0
- data/vendor/assets/bower_components/jquery/src/css/var/cssExpand.js +3 -0
- data/vendor/assets/bower_components/jquery/src/css/var/getStyles.js +15 -0
- data/vendor/assets/bower_components/jquery/src/css/var/isHidden.js +16 -0
- data/vendor/assets/bower_components/jquery/src/css/var/rmargin.js +3 -0
- data/vendor/assets/bower_components/jquery/src/css/var/rnumnonpx.js +5 -0
- data/vendor/assets/bower_components/jquery/src/css/var/swap.js +24 -0
- data/vendor/assets/bower_components/jquery/src/data.js +187 -0
- data/vendor/assets/bower_components/jquery/src/data/Data.js +200 -0
- data/vendor/assets/bower_components/jquery/src/data/accepts.js +20 -0
- data/vendor/assets/bower_components/jquery/src/data/support.js +23 -0
- data/vendor/assets/bower_components/jquery/src/data/var/acceptData.js +18 -0
- data/vendor/assets/bower_components/jquery/src/data/var/dataPriv.js +5 -0
- data/vendor/assets/bower_components/jquery/src/data/var/dataUser.js +5 -0
- data/vendor/assets/bower_components/jquery/src/deferred.js +158 -0
- data/vendor/assets/bower_components/jquery/src/deferred/exceptionHook.js +19 -0
- data/vendor/assets/bower_components/jquery/src/deprecated.js +32 -0
- data/vendor/assets/bower_components/jquery/src/dimensions.js +54 -0
- data/vendor/assets/bower_components/jquery/src/effects.js +629 -0
- data/vendor/assets/bower_components/jquery/src/effects/Tween.js +121 -0
- data/vendor/assets/bower_components/jquery/src/effects/animatedSelector.js +13 -0
- data/vendor/assets/bower_components/jquery/src/effects/support.js +58 -0
- data/vendor/assets/bower_components/jquery/src/event.js +710 -0
- data/vendor/assets/bower_components/jquery/src/event/ajax.js +20 -0
- data/vendor/assets/bower_components/jquery/src/event/alias.js +27 -0
- data/vendor/assets/bower_components/jquery/src/event/focusin.js +53 -0
- data/vendor/assets/bower_components/jquery/src/event/support.js +9 -0
- data/vendor/assets/bower_components/jquery/src/event/trigger.js +199 -0
- data/vendor/assets/bower_components/jquery/src/exports/amd.js +24 -0
- data/vendor/assets/bower_components/jquery/src/exports/global.js +26 -0
- data/vendor/assets/bower_components/jquery/src/intro.js +44 -0
- data/vendor/assets/bower_components/jquery/src/jquery.js +37 -0
- data/vendor/assets/bower_components/jquery/src/manipulation.js +481 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/_evalUrl.js +20 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/buildFragment.js +102 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/createSafeFragment.js +20 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/getAll.js +21 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/setGlobalEval.js +20 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/support.js +33 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/nodeNames.js +5 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/rleadingWhitespace.js +3 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/rtagName.js +3 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/wrapMap.js +27 -0
- data/vendor/assets/bower_components/jquery/src/offset.js +218 -0
- data/vendor/assets/bower_components/jquery/src/outro.js +2 -0
- data/vendor/assets/bower_components/jquery/src/queue.js +143 -0
- data/vendor/assets/bower_components/jquery/src/queue/delay.js +22 -0
- data/vendor/assets/bower_components/jquery/src/selector-native.js +211 -0
- data/vendor/assets/bower_components/jquery/src/selector-sizzle.js +14 -0
- data/vendor/assets/bower_components/jquery/src/selector.js +1 -0
- data/vendor/assets/bower_components/jquery/src/serialize.js +125 -0
- data/vendor/assets/bower_components/jquery/src/support.js +63 -0
- data/vendor/assets/bower_components/jquery/src/traversing.js +175 -0
- data/vendor/assets/bower_components/jquery/src/traversing/findFilter.js +100 -0
- data/vendor/assets/bower_components/jquery/src/traversing/var/dir.js +20 -0
- data/vendor/assets/bower_components/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/vendor/assets/bower_components/jquery/src/traversing/var/siblings.js +15 -0
- data/vendor/assets/bower_components/jquery/src/var/arr.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/class2type.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/concat.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/deletedIds.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/document.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/documentElement.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/hasOwn.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/indexOf.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/pnum.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/push.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/rcssNum.js +7 -0
- data/vendor/assets/bower_components/jquery/src/var/rnotwhite.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/slice.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/support.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/toString.js +5 -0
- data/vendor/assets/bower_components/jquery/src/wrap.js +79 -0
- data/vendor/assets/bower_components/marked/Gulpfile.js +22 -0
- data/vendor/assets/bower_components/marked/LICENSE +19 -0
- data/vendor/assets/bower_components/marked/Makefile +12 -0
- data/vendor/assets/bower_components/marked/README.md +406 -0
- data/vendor/assets/bower_components/marked/bin/marked +187 -0
- data/vendor/assets/bower_components/marked/bower.json +24 -0
- data/vendor/assets/bower_components/marked/component.json +10 -0
- data/vendor/assets/bower_components/marked/doc/broken.md +426 -0
- data/vendor/assets/bower_components/marked/doc/todo.md +2 -0
- data/vendor/assets/bower_components/marked/index.js +1 -0
- data/vendor/assets/bower_components/marked/lib/marked.js +1285 -0
- data/vendor/assets/bower_components/marked/man/marked.1 +91 -0
- data/vendor/assets/bower_components/marked/marked.min.js +6 -0
- data/vendor/assets/bower_components/marked/package.json +24 -0
- data/vendor/assets/bower_components/moment/CHANGELOG.md +423 -0
- data/vendor/assets/bower_components/moment/LICENSE +22 -0
- data/vendor/assets/bower_components/moment/Moment.js.nuspec +28 -0
- data/vendor/assets/bower_components/moment/README.md +39 -0
- data/vendor/assets/bower_components/moment/benchmarks/clone.js +10 -0
- data/vendor/assets/bower_components/moment/bower.json +20 -0
- data/vendor/assets/bower_components/moment/locale/af.js +71 -0
- data/vendor/assets/bower_components/moment/locale/ar-ma.js +57 -0
- data/vendor/assets/bower_components/moment/locale/ar-sa.js +101 -0
- data/vendor/assets/bower_components/moment/locale/ar-tn.js +55 -0
- data/vendor/assets/bower_components/moment/locale/ar.js +134 -0
- data/vendor/assets/bower_components/moment/locale/az.js +107 -0
- data/vendor/assets/bower_components/moment/locale/be.js +154 -0
- data/vendor/assets/bower_components/moment/locale/bg.js +88 -0
- data/vendor/assets/bower_components/moment/locale/bn.js +111 -0
- data/vendor/assets/bower_components/moment/locale/bo.js +108 -0
- data/vendor/assets/bower_components/moment/locale/br.js +109 -0
- data/vendor/assets/bower_components/moment/locale/bs.js +140 -0
- data/vendor/assets/bower_components/moment/locale/ca.js +77 -0
- data/vendor/assets/bower_components/moment/locale/cs.js +157 -0
- data/vendor/assets/bower_components/moment/locale/cv.js +61 -0
- data/vendor/assets/bower_components/moment/locale/cy.js +79 -0
- data/vendor/assets/bower_components/moment/locale/da.js +58 -0
- data/vendor/assets/bower_components/moment/locale/de-at.js +74 -0
- data/vendor/assets/bower_components/moment/locale/de.js +73 -0
- data/vendor/assets/bower_components/moment/locale/el.js +94 -0
- data/vendor/assets/bower_components/moment/locale/en-au.js +64 -0
- data/vendor/assets/bower_components/moment/locale/en-ca.js +61 -0
- data/vendor/assets/bower_components/moment/locale/en-gb.js +65 -0
- data/vendor/assets/bower_components/moment/locale/eo.js +71 -0
- data/vendor/assets/bower_components/moment/locale/es.js +77 -0
- data/vendor/assets/bower_components/moment/locale/et.js +78 -0
- data/vendor/assets/bower_components/moment/locale/eu.js +62 -0
- data/vendor/assets/bower_components/moment/locale/fa.js +103 -0
- data/vendor/assets/bower_components/moment/locale/fi.js +107 -0
- data/vendor/assets/bower_components/moment/locale/fo.js +58 -0
- data/vendor/assets/bower_components/moment/locale/fr-ca.js +56 -0
- data/vendor/assets/bower_components/moment/locale/fr.js +60 -0
- data/vendor/assets/bower_components/moment/locale/fy.js +69 -0
- data/vendor/assets/bower_components/moment/locale/gl.js +73 -0
- data/vendor/assets/bower_components/moment/locale/he.js +80 -0
- data/vendor/assets/bower_components/moment/locale/hi.js +121 -0
- data/vendor/assets/bower_components/moment/locale/hr.js +141 -0
- data/vendor/assets/bower_components/moment/locale/hu.js +111 -0
- data/vendor/assets/bower_components/moment/locale/hy-am.js +118 -0
- data/vendor/assets/bower_components/moment/locale/id.js +81 -0
- data/vendor/assets/bower_components/moment/locale/is.js +126 -0
- data/vendor/assets/bower_components/moment/locale/it.js +68 -0
- data/vendor/assets/bower_components/moment/locale/ja.js +63 -0
- data/vendor/assets/bower_components/moment/locale/ka.js +109 -0
- data/vendor/assets/bower_components/moment/locale/km.js +56 -0
- data/vendor/assets/bower_components/moment/locale/ko.js +65 -0
- data/vendor/assets/bower_components/moment/locale/lb.js +139 -0
- data/vendor/assets/bower_components/moment/locale/lt.js +120 -0
- data/vendor/assets/bower_components/moment/locale/lv.js +79 -0
- data/vendor/assets/bower_components/moment/locale/mk.js +88 -0
- data/vendor/assets/bower_components/moment/locale/ml.js +69 -0
- data/vendor/assets/bower_components/moment/locale/mr.js +120 -0
- data/vendor/assets/bower_components/moment/locale/ms-my.js +80 -0
- data/vendor/assets/bower_components/moment/locale/my.js +89 -0
- data/vendor/assets/bower_components/moment/locale/nb.js +59 -0
- data/vendor/assets/bower_components/moment/locale/ne.js +121 -0
- data/vendor/assets/bower_components/moment/locale/nl.js +69 -0
- data/vendor/assets/bower_components/moment/locale/nn.js +58 -0
- data/vendor/assets/bower_components/moment/locale/pl.js +100 -0
- data/vendor/assets/bower_components/moment/locale/pt-br.js +58 -0
- data/vendor/assets/bower_components/moment/locale/pt.js +62 -0
- data/vendor/assets/bower_components/moment/locale/ro.js +73 -0
- data/vendor/assets/bower_components/moment/locale/ru.js +176 -0
- data/vendor/assets/bower_components/moment/locale/sk.js +158 -0
- data/vendor/assets/bower_components/moment/locale/sl.js +146 -0
- data/vendor/assets/bower_components/moment/locale/sq.js +67 -0
- data/vendor/assets/bower_components/moment/locale/sr-cyrl.js +107 -0
- data/vendor/assets/bower_components/moment/locale/sr.js +107 -0
- data/vendor/assets/bower_components/moment/locale/sv.js +65 -0
- data/vendor/assets/bower_components/moment/locale/ta.js +130 -0
- data/vendor/assets/bower_components/moment/locale/th.js +63 -0
- data/vendor/assets/bower_components/moment/locale/tl-ph.js +60 -0
- data/vendor/assets/bower_components/moment/locale/tr.js +94 -0
- data/vendor/assets/bower_components/moment/locale/tzm-latn.js +56 -0
- data/vendor/assets/bower_components/moment/locale/tzm.js +56 -0
- data/vendor/assets/bower_components/moment/locale/uk.js +163 -0
- data/vendor/assets/bower_components/moment/locale/uz.js +56 -0
- data/vendor/assets/bower_components/moment/locale/vi.js +64 -0
- data/vendor/assets/bower_components/moment/locale/zh-cn.js +125 -0
- data/vendor/assets/bower_components/moment/locale/zh-tw.js +99 -0
- data/vendor/assets/bower_components/moment/meteor/README.md +25 -0
- data/vendor/assets/bower_components/moment/meteor/export.js +3 -0
- data/vendor/assets/bower_components/moment/meteor/test.js +5 -0
- data/vendor/assets/bower_components/moment/min/locales.js +7306 -0
- data/vendor/assets/bower_components/moment/min/locales.min.js +4 -0
- data/vendor/assets/bower_components/moment/min/moment-with-locales.js +9792 -0
- data/vendor/assets/bower_components/moment/min/moment-with-locales.min.js +10 -0
- data/vendor/assets/bower_components/moment/min/moment.min.js +7 -0
- data/vendor/assets/bower_components/moment/moment.js +3043 -0
- data/vendor/assets/bower_components/moment/scripts/npm_prepublish.sh +43 -0
- data/vendor/assets/bower_components/underscore/LICENSE +23 -0
- data/vendor/assets/bower_components/underscore/README.md +22 -0
- data/vendor/assets/bower_components/underscore/bower.json +7 -0
- data/vendor/assets/bower_components/underscore/underscore-min.js +6 -0
- data/vendor/assets/bower_components/underscore/underscore-min.map +1 -0
- data/vendor/assets/bower_components/underscore/underscore.js +1548 -0
- metadata +782 -0
@@ -0,0 +1,187 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Marked CLI
|
5
|
+
* Copyright (c) 2011-2013, Christopher Jeffrey (MIT License)
|
6
|
+
*/
|
7
|
+
|
8
|
+
var fs = require('fs')
|
9
|
+
, util = require('util')
|
10
|
+
, marked = require('../');
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Man Page
|
14
|
+
*/
|
15
|
+
|
16
|
+
function help() {
|
17
|
+
var spawn = require('child_process').spawn;
|
18
|
+
|
19
|
+
var options = {
|
20
|
+
cwd: process.cwd(),
|
21
|
+
env: process.env,
|
22
|
+
setsid: false,
|
23
|
+
customFds: [0, 1, 2]
|
24
|
+
};
|
25
|
+
|
26
|
+
spawn('man',
|
27
|
+
[__dirname + '/../man/marked.1'],
|
28
|
+
options);
|
29
|
+
}
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Main
|
33
|
+
*/
|
34
|
+
|
35
|
+
function main(argv, callback) {
|
36
|
+
var files = []
|
37
|
+
, options = {}
|
38
|
+
, input
|
39
|
+
, output
|
40
|
+
, arg
|
41
|
+
, tokens
|
42
|
+
, opt;
|
43
|
+
|
44
|
+
function getarg() {
|
45
|
+
var arg = argv.shift();
|
46
|
+
|
47
|
+
if (arg.indexOf('--') === 0) {
|
48
|
+
// e.g. --opt
|
49
|
+
arg = arg.split('=');
|
50
|
+
if (arg.length > 1) {
|
51
|
+
// e.g. --opt=val
|
52
|
+
argv.unshift(arg.slice(1).join('='));
|
53
|
+
}
|
54
|
+
arg = arg[0];
|
55
|
+
} else if (arg[0] === '-') {
|
56
|
+
if (arg.length > 2) {
|
57
|
+
// e.g. -abc
|
58
|
+
argv = arg.substring(1).split('').map(function(ch) {
|
59
|
+
return '-' + ch;
|
60
|
+
}).concat(argv);
|
61
|
+
arg = argv.shift();
|
62
|
+
} else {
|
63
|
+
// e.g. -a
|
64
|
+
}
|
65
|
+
} else {
|
66
|
+
// e.g. foo
|
67
|
+
}
|
68
|
+
|
69
|
+
return arg;
|
70
|
+
}
|
71
|
+
|
72
|
+
while (argv.length) {
|
73
|
+
arg = getarg();
|
74
|
+
switch (arg) {
|
75
|
+
case '--test':
|
76
|
+
return require('../test').main(process.argv.slice());
|
77
|
+
case '-o':
|
78
|
+
case '--output':
|
79
|
+
output = argv.shift();
|
80
|
+
break;
|
81
|
+
case '-i':
|
82
|
+
case '--input':
|
83
|
+
input = argv.shift();
|
84
|
+
break;
|
85
|
+
case '-t':
|
86
|
+
case '--tokens':
|
87
|
+
tokens = true;
|
88
|
+
break;
|
89
|
+
case '-h':
|
90
|
+
case '--help':
|
91
|
+
return help();
|
92
|
+
default:
|
93
|
+
if (arg.indexOf('--') === 0) {
|
94
|
+
opt = camelize(arg.replace(/^--(no-)?/, ''));
|
95
|
+
if (!marked.defaults.hasOwnProperty(opt)) {
|
96
|
+
continue;
|
97
|
+
}
|
98
|
+
if (arg.indexOf('--no-') === 0) {
|
99
|
+
options[opt] = typeof marked.defaults[opt] !== 'boolean'
|
100
|
+
? null
|
101
|
+
: false;
|
102
|
+
} else {
|
103
|
+
options[opt] = typeof marked.defaults[opt] !== 'boolean'
|
104
|
+
? argv.shift()
|
105
|
+
: true;
|
106
|
+
}
|
107
|
+
} else {
|
108
|
+
files.push(arg);
|
109
|
+
}
|
110
|
+
break;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
function getData(callback) {
|
115
|
+
if (!input) {
|
116
|
+
if (files.length <= 2) {
|
117
|
+
return getStdin(callback);
|
118
|
+
}
|
119
|
+
input = files.pop();
|
120
|
+
}
|
121
|
+
return fs.readFile(input, 'utf8', callback);
|
122
|
+
}
|
123
|
+
|
124
|
+
return getData(function(err, data) {
|
125
|
+
if (err) return callback(err);
|
126
|
+
|
127
|
+
data = tokens
|
128
|
+
? JSON.stringify(marked.lexer(data, options), null, 2)
|
129
|
+
: marked(data, options);
|
130
|
+
|
131
|
+
if (!output) {
|
132
|
+
process.stdout.write(data + '\n');
|
133
|
+
return callback();
|
134
|
+
}
|
135
|
+
|
136
|
+
return fs.writeFile(output, data, callback);
|
137
|
+
});
|
138
|
+
}
|
139
|
+
|
140
|
+
/**
|
141
|
+
* Helpers
|
142
|
+
*/
|
143
|
+
|
144
|
+
function getStdin(callback) {
|
145
|
+
var stdin = process.stdin
|
146
|
+
, buff = '';
|
147
|
+
|
148
|
+
stdin.setEncoding('utf8');
|
149
|
+
|
150
|
+
stdin.on('data', function(data) {
|
151
|
+
buff += data;
|
152
|
+
});
|
153
|
+
|
154
|
+
stdin.on('error', function(err) {
|
155
|
+
return callback(err);
|
156
|
+
});
|
157
|
+
|
158
|
+
stdin.on('end', function() {
|
159
|
+
return callback(null, buff);
|
160
|
+
});
|
161
|
+
|
162
|
+
try {
|
163
|
+
stdin.resume();
|
164
|
+
} catch (e) {
|
165
|
+
callback(e);
|
166
|
+
}
|
167
|
+
}
|
168
|
+
|
169
|
+
function camelize(text) {
|
170
|
+
return text.replace(/(\w)-(\w)/g, function(_, a, b) {
|
171
|
+
return a + b.toUpperCase();
|
172
|
+
});
|
173
|
+
}
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Expose / Entry Point
|
177
|
+
*/
|
178
|
+
|
179
|
+
if (!module.parent) {
|
180
|
+
process.title = 'marked';
|
181
|
+
main(process.argv.slice(), function(err, code) {
|
182
|
+
if (err) throw err;
|
183
|
+
return process.exit(code || 0);
|
184
|
+
});
|
185
|
+
} else {
|
186
|
+
module.exports = main;
|
187
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"name": "marked",
|
3
|
+
"version": "0.3.4",
|
4
|
+
"homepage": "https://github.com/chjj/marked",
|
5
|
+
"authors": [
|
6
|
+
"Christopher Jeffrey <chjjeffrey@gmail.com>"
|
7
|
+
],
|
8
|
+
"description": "A markdown parser built for speed",
|
9
|
+
"keywords": [
|
10
|
+
"markdown",
|
11
|
+
"markup",
|
12
|
+
"html"
|
13
|
+
],
|
14
|
+
"main": "lib/marked.js",
|
15
|
+
"license": "MIT",
|
16
|
+
"ignore": [
|
17
|
+
"**/.*",
|
18
|
+
"node_modules",
|
19
|
+
"bower_components",
|
20
|
+
"app/bower_components",
|
21
|
+
"test",
|
22
|
+
"tests"
|
23
|
+
]
|
24
|
+
}
|
@@ -0,0 +1,426 @@
|
|
1
|
+
# Markdown is broken
|
2
|
+
|
3
|
+
I have a lot of scraps of markdown engine oddities that I've collected over the
|
4
|
+
years. What you see below is slightly messy, but it's what I've managed to
|
5
|
+
cobble together to illustrate the differences between markdown engines, and
|
6
|
+
why, if there ever is a markdown specification, it has to be absolutely
|
7
|
+
thorough. There are a lot more of these little differences I have documented
|
8
|
+
elsewhere. I know I will find them lingering on my disk one day, but until
|
9
|
+
then, I'll continue to add whatever strange nonsensical things I find.
|
10
|
+
|
11
|
+
Some of these examples may only mention a particular engine compared to marked.
|
12
|
+
However, the examples with markdown.pl could easily be swapped out for
|
13
|
+
discount, upskirt, or markdown.js, and you would very easily see even more
|
14
|
+
inconsistencies.
|
15
|
+
|
16
|
+
A lot of this was written when I was very unsatisfied with the inconsistencies
|
17
|
+
between markdown engines. Please excuse the frustration noticeable in my
|
18
|
+
writing.
|
19
|
+
|
20
|
+
## Examples of markdown's "stupid" list parsing
|
21
|
+
|
22
|
+
```
|
23
|
+
$ markdown.pl
|
24
|
+
|
25
|
+
* item1
|
26
|
+
|
27
|
+
* item2
|
28
|
+
|
29
|
+
text
|
30
|
+
^D
|
31
|
+
<ul>
|
32
|
+
<li><p>item1</p>
|
33
|
+
|
34
|
+
<ul>
|
35
|
+
<li>item2</li>
|
36
|
+
</ul>
|
37
|
+
|
38
|
+
<p><p>text</p></li>
|
39
|
+
</ul></p>
|
40
|
+
```
|
41
|
+
|
42
|
+
|
43
|
+
```
|
44
|
+
$ marked
|
45
|
+
* item1
|
46
|
+
|
47
|
+
* item2
|
48
|
+
|
49
|
+
text
|
50
|
+
^D
|
51
|
+
<ul>
|
52
|
+
<li><p>item1</p>
|
53
|
+
<ul>
|
54
|
+
<li>item2</li>
|
55
|
+
</ul>
|
56
|
+
<p>text</p>
|
57
|
+
</li>
|
58
|
+
</ul>
|
59
|
+
```
|
60
|
+
|
61
|
+
Which looks correct to you?
|
62
|
+
|
63
|
+
- - -
|
64
|
+
|
65
|
+
```
|
66
|
+
$ markdown.pl
|
67
|
+
* hello
|
68
|
+
> world
|
69
|
+
^D
|
70
|
+
<p><ul>
|
71
|
+
<li>hello</p>
|
72
|
+
|
73
|
+
<blockquote>
|
74
|
+
<p>world</li>
|
75
|
+
</ul></p>
|
76
|
+
</blockquote>
|
77
|
+
```
|
78
|
+
|
79
|
+
```
|
80
|
+
$ marked
|
81
|
+
* hello
|
82
|
+
> world
|
83
|
+
^D
|
84
|
+
<ul>
|
85
|
+
<li>hello<blockquote>
|
86
|
+
<p>world</p>
|
87
|
+
</blockquote>
|
88
|
+
</li>
|
89
|
+
</ul>
|
90
|
+
```
|
91
|
+
|
92
|
+
Again, which looks correct to you?
|
93
|
+
|
94
|
+
- - -
|
95
|
+
|
96
|
+
EXAMPLE:
|
97
|
+
|
98
|
+
```
|
99
|
+
$ markdown.pl
|
100
|
+
* hello
|
101
|
+
* world
|
102
|
+
* hi
|
103
|
+
code
|
104
|
+
^D
|
105
|
+
<ul>
|
106
|
+
<li>hello
|
107
|
+
<ul>
|
108
|
+
<li>world</li>
|
109
|
+
<li>hi
|
110
|
+
code</li>
|
111
|
+
</ul></li>
|
112
|
+
</ul>
|
113
|
+
```
|
114
|
+
|
115
|
+
The code isn't a code block even though it's after the bullet margin. I know,
|
116
|
+
lets give it two more spaces, effectively making it 8 spaces past the bullet.
|
117
|
+
|
118
|
+
```
|
119
|
+
$ markdown.pl
|
120
|
+
* hello
|
121
|
+
* world
|
122
|
+
* hi
|
123
|
+
code
|
124
|
+
^D
|
125
|
+
<ul>
|
126
|
+
<li>hello
|
127
|
+
<ul>
|
128
|
+
<li>world</li>
|
129
|
+
<li>hi
|
130
|
+
code</li>
|
131
|
+
</ul></li>
|
132
|
+
</ul>
|
133
|
+
```
|
134
|
+
|
135
|
+
And, it's still not a code block. Did you also notice that the 3rd item isn't
|
136
|
+
even its own list? Markdown screws that up too because of its indentation
|
137
|
+
unaware parsing.
|
138
|
+
|
139
|
+
- - -
|
140
|
+
|
141
|
+
Let's look at some more examples of markdown's list parsing:
|
142
|
+
|
143
|
+
```
|
144
|
+
$ markdown.pl
|
145
|
+
|
146
|
+
* item1
|
147
|
+
|
148
|
+
* item2
|
149
|
+
|
150
|
+
text
|
151
|
+
^D
|
152
|
+
<ul>
|
153
|
+
<li><p>item1</p>
|
154
|
+
|
155
|
+
<ul>
|
156
|
+
<li>item2</li>
|
157
|
+
</ul>
|
158
|
+
|
159
|
+
<p><p>text</p></li>
|
160
|
+
</ul></p>
|
161
|
+
```
|
162
|
+
|
163
|
+
Misnested tags.
|
164
|
+
|
165
|
+
|
166
|
+
```
|
167
|
+
$ marked
|
168
|
+
* item1
|
169
|
+
|
170
|
+
* item2
|
171
|
+
|
172
|
+
text
|
173
|
+
^D
|
174
|
+
<ul>
|
175
|
+
<li><p>item1</p>
|
176
|
+
<ul>
|
177
|
+
<li>item2</li>
|
178
|
+
</ul>
|
179
|
+
<p>text</p>
|
180
|
+
</li>
|
181
|
+
</ul>
|
182
|
+
```
|
183
|
+
|
184
|
+
Which looks correct to you?
|
185
|
+
|
186
|
+
- - -
|
187
|
+
|
188
|
+
```
|
189
|
+
$ markdown.pl
|
190
|
+
* hello
|
191
|
+
> world
|
192
|
+
^D
|
193
|
+
<p><ul>
|
194
|
+
<li>hello</p>
|
195
|
+
|
196
|
+
<blockquote>
|
197
|
+
<p>world</li>
|
198
|
+
</ul></p>
|
199
|
+
</blockquote>
|
200
|
+
```
|
201
|
+
|
202
|
+
More misnested tags.
|
203
|
+
|
204
|
+
|
205
|
+
```
|
206
|
+
$ marked
|
207
|
+
* hello
|
208
|
+
> world
|
209
|
+
^D
|
210
|
+
<ul>
|
211
|
+
<li>hello<blockquote>
|
212
|
+
<p>world</p>
|
213
|
+
</blockquote>
|
214
|
+
</li>
|
215
|
+
</ul>
|
216
|
+
```
|
217
|
+
|
218
|
+
Again, which looks correct to you?
|
219
|
+
|
220
|
+
- - -
|
221
|
+
|
222
|
+
# Why quality matters - Part 2
|
223
|
+
|
224
|
+
``` bash
|
225
|
+
$ markdown.pl
|
226
|
+
* hello
|
227
|
+
> world
|
228
|
+
^D
|
229
|
+
<p><ul>
|
230
|
+
<li>hello</p>
|
231
|
+
|
232
|
+
<blockquote>
|
233
|
+
<p>world</li>
|
234
|
+
</ul></p>
|
235
|
+
</blockquote>
|
236
|
+
```
|
237
|
+
|
238
|
+
``` bash
|
239
|
+
$ sundown # upskirt
|
240
|
+
* hello
|
241
|
+
> world
|
242
|
+
^D
|
243
|
+
<ul>
|
244
|
+
<li>hello
|
245
|
+
> world</li>
|
246
|
+
</ul>
|
247
|
+
```
|
248
|
+
|
249
|
+
``` bash
|
250
|
+
$ marked
|
251
|
+
* hello
|
252
|
+
> world
|
253
|
+
^D
|
254
|
+
<ul><li>hello <blockquote><p>world</p></blockquote></li></ul>
|
255
|
+
```
|
256
|
+
|
257
|
+
Which looks correct to you?
|
258
|
+
|
259
|
+
- - -
|
260
|
+
|
261
|
+
See: https://github.com/evilstreak/markdown-js/issues/23
|
262
|
+
|
263
|
+
``` bash
|
264
|
+
$ markdown.pl # upskirt/markdown.js/discount
|
265
|
+
* hello
|
266
|
+
var a = 1;
|
267
|
+
* world
|
268
|
+
^D
|
269
|
+
<ul>
|
270
|
+
<li>hello
|
271
|
+
var a = 1;</li>
|
272
|
+
<li>world</li>
|
273
|
+
</ul>
|
274
|
+
```
|
275
|
+
|
276
|
+
``` bash
|
277
|
+
$ marked
|
278
|
+
* hello
|
279
|
+
var a = 1;
|
280
|
+
* world
|
281
|
+
^D
|
282
|
+
<ul><li>hello
|
283
|
+
<pre>code>var a = 1;</code></pre></li>
|
284
|
+
<li>world</li></ul>
|
285
|
+
```
|
286
|
+
|
287
|
+
Which looks more reasonable? Why shouldn't code blocks be able to appear in
|
288
|
+
list items in a sane way?
|
289
|
+
|
290
|
+
- - -
|
291
|
+
|
292
|
+
``` bash
|
293
|
+
$ markdown.js
|
294
|
+
<div>hello</div>
|
295
|
+
|
296
|
+
<span>hello</span>
|
297
|
+
^D
|
298
|
+
<p><div>hello</div></p>
|
299
|
+
|
300
|
+
<p><span>hello</span></p>
|
301
|
+
```
|
302
|
+
|
303
|
+
``` bash
|
304
|
+
$ marked
|
305
|
+
<div>hello</div>
|
306
|
+
|
307
|
+
<span>hello</span>
|
308
|
+
^D
|
309
|
+
<div>hello</div>
|
310
|
+
|
311
|
+
|
312
|
+
<p><span>hello</span>
|
313
|
+
</p>
|
314
|
+
```
|
315
|
+
|
316
|
+
- - -
|
317
|
+
|
318
|
+
See: https://github.com/evilstreak/markdown-js/issues/27
|
319
|
+
|
320
|
+
``` bash
|
321
|
+
$ markdown.js
|
322
|
+
[![an image](/image)](/link)
|
323
|
+
^D
|
324
|
+
<p><a href="/image)](/link">![an image</a></p>
|
325
|
+
```
|
326
|
+
|
327
|
+
``` bash
|
328
|
+
$ marked
|
329
|
+
[![an image](/image)](/link)
|
330
|
+
^D
|
331
|
+
<p><a href="/link"><img src="/image" alt="an image"></a>
|
332
|
+
</p>
|
333
|
+
```
|
334
|
+
|
335
|
+
- - -
|
336
|
+
|
337
|
+
See: https://github.com/evilstreak/markdown-js/issues/24
|
338
|
+
|
339
|
+
``` bash
|
340
|
+
$ markdown.js
|
341
|
+
> a
|
342
|
+
|
343
|
+
> b
|
344
|
+
|
345
|
+
> c
|
346
|
+
^D
|
347
|
+
<blockquote><p>a</p><p>bundefined> c</p></blockquote>
|
348
|
+
```
|
349
|
+
|
350
|
+
``` bash
|
351
|
+
$ marked
|
352
|
+
> a
|
353
|
+
|
354
|
+
> b
|
355
|
+
|
356
|
+
> c
|
357
|
+
^D
|
358
|
+
<blockquote><p>a
|
359
|
+
|
360
|
+
</p></blockquote>
|
361
|
+
<blockquote><p>b
|
362
|
+
|
363
|
+
</p></blockquote>
|
364
|
+
<blockquote><p>c
|
365
|
+
</p></blockquote>
|
366
|
+
```
|
367
|
+
|
368
|
+
- - -
|
369
|
+
|
370
|
+
``` bash
|
371
|
+
$ markdown.pl
|
372
|
+
* hello
|
373
|
+
* world
|
374
|
+
how
|
375
|
+
|
376
|
+
are
|
377
|
+
you
|
378
|
+
|
379
|
+
* today
|
380
|
+
* hi
|
381
|
+
^D
|
382
|
+
<ul>
|
383
|
+
<li><p>hello</p>
|
384
|
+
|
385
|
+
<ul>
|
386
|
+
<li>world
|
387
|
+
how</li>
|
388
|
+
</ul>
|
389
|
+
|
390
|
+
<p>are
|
391
|
+
you</p>
|
392
|
+
|
393
|
+
<ul>
|
394
|
+
<li>today</li>
|
395
|
+
</ul></li>
|
396
|
+
<li>hi</li>
|
397
|
+
</ul>
|
398
|
+
```
|
399
|
+
|
400
|
+
``` bash
|
401
|
+
$ marked
|
402
|
+
* hello
|
403
|
+
* world
|
404
|
+
how
|
405
|
+
|
406
|
+
are
|
407
|
+
you
|
408
|
+
|
409
|
+
* today
|
410
|
+
* hi
|
411
|
+
^D
|
412
|
+
<ul>
|
413
|
+
<li><p>hello</p>
|
414
|
+
<ul>
|
415
|
+
<li><p>world
|
416
|
+
how</p>
|
417
|
+
<p>are
|
418
|
+
you</p>
|
419
|
+
</li>
|
420
|
+
<li><p>today</p>
|
421
|
+
</li>
|
422
|
+
</ul>
|
423
|
+
</li>
|
424
|
+
<li>hi</li>
|
425
|
+
</ul>
|
426
|
+
```
|