guard-mthaml 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +34 -0
- data/lib/guard/mthaml.rb +140 -0
- data/lib/guard/mthaml/compiler/MtHaml.php +255 -0
- data/lib/guard/mthaml/templates/Guardfile +12 -0
- data/lib/guard/mthaml/version.rb +5 -0
- data/vendor/autoload.php +7 -0
- data/vendor/coffeescript/coffeescript/LICENSE +22 -0
- data/vendor/coffeescript/coffeescript/README.md +96 -0
- data/vendor/coffeescript/coffeescript/composer.json +23 -0
- data/vendor/coffeescript/coffeescript/grammar.y +309 -0
- data/vendor/coffeescript/coffeescript/make.php +115 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Compiler.php +76 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Error.php +15 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Helpers.php +116 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Init.php +96 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Lexer.php +1356 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Nodes.php +105 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Parser.php +3326 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Rewriter.php +552 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Scope.php +196 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/SyntaxError.php +9 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Value.php +20 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Access.php +31 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Arr.php +69 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Assign.php +353 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Base.php +288 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Block.php +294 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Call.php +283 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Class.php +282 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Closure.php +49 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Code.php +203 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Comment.php +39 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Existence.php +42 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Extends.php +26 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/For.php +250 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/If.php +161 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/In.php +99 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Index.php +27 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Literal.php +96 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Obj.php +126 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Op.php +292 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Param.php +119 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Parens.php +45 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Range.php +225 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Return.php +56 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Slice.php +47 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Splat.php +100 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Switch.php +121 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Throw.php +37 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Try.php +79 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Value.php +210 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/While.php +112 -0
- data/vendor/coffeescript/coffeescript/tests/cases/arrays.coffee +77 -0
- data/vendor/coffeescript/coffeescript/tests/cases/assignment.coffee +352 -0
- data/vendor/coffeescript/coffeescript/tests/cases/booleans.coffee +21 -0
- data/vendor/coffeescript/coffeescript/tests/cases/classes.coffee +681 -0
- data/vendor/coffeescript/coffeescript/tests/cases/comments.coffee +207 -0
- data/vendor/coffeescript/coffeescript/tests/cases/compilation.coffee +72 -0
- data/vendor/coffeescript/coffeescript/tests/cases/comprehensions.coffee +501 -0
- data/vendor/coffeescript/coffeescript/tests/cases/control_flow.coffee +430 -0
- data/vendor/coffeescript/coffeescript/tests/cases/eval.coffee +29 -0
- data/vendor/coffeescript/coffeescript/tests/cases/exception_handling.coffee +102 -0
- data/vendor/coffeescript/coffeescript/tests/cases/formatting.coffee +146 -0
- data/vendor/coffeescript/coffeescript/tests/cases/function_invocation.coffee +552 -0
- data/vendor/coffeescript/coffeescript/tests/cases/functions.coffee +188 -0
- data/vendor/coffeescript/coffeescript/tests/cases/helpers.coffee +96 -0
- data/vendor/coffeescript/coffeescript/tests/cases/importing.coffee +18 -0
- data/vendor/coffeescript/coffeescript/tests/cases/interpolation.coffee +138 -0
- data/vendor/coffeescript/coffeescript/tests/cases/javascript_literals.coffee +10 -0
- data/vendor/coffeescript/coffeescript/tests/cases/numbers.coffee +76 -0
- data/vendor/coffeescript/coffeescript/tests/cases/objects.coffee +271 -0
- data/vendor/coffeescript/coffeescript/tests/cases/operators.coffee +277 -0
- data/vendor/coffeescript/coffeescript/tests/cases/option_parser.coffee +43 -0
- data/vendor/coffeescript/coffeescript/tests/cases/ranges.coffee +88 -0
- data/vendor/coffeescript/coffeescript/tests/cases/regexps.coffee +63 -0
- data/vendor/coffeescript/coffeescript/tests/cases/scope.coffee +43 -0
- data/vendor/coffeescript/coffeescript/tests/cases/slicing_and_splicing.coffee +143 -0
- data/vendor/coffeescript/coffeescript/tests/cases/soaks.coffee +134 -0
- data/vendor/coffeescript/coffeescript/tests/cases/strict.coffee +155 -0
- data/vendor/coffeescript/coffeescript/tests/cases/strings.coffee +107 -0
- data/vendor/coffeescript/coffeescript/tests/css/style.css +43 -0
- data/vendor/coffeescript/coffeescript/tests/index.php +119 -0
- data/vendor/coffeescript/coffeescript/tests/js/lib/coffeescript_1.1.1.js +8 -0
- data/vendor/coffeescript/coffeescript/tests/js/lib/coffeescript_1.2.0.js +8 -0
- data/vendor/coffeescript/coffeescript/tests/js/lib/coffeescript_1.3.0.js +8 -0
- data/vendor/coffeescript/coffeescript/tests/js/lib/coffeescript_1.3.1.js +8 -0
- data/vendor/coffeescript/coffeescript/tests/js/lib/diff.js +276 -0
- data/vendor/coffeescript/coffeescript/tests/js/main.js +123 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/LICENSE.txt +10 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/Lempar.php +948 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Action.php +257 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/ActionTable.php +299 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Config.php +574 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Data.php +1857 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Parser.php +851 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/PropagationLink.php +126 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Rule.php +144 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/State.php +283 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Symbol.php +288 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/cli.php +5 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/ParserGenerator.php +811 -0
- data/vendor/composer/ClassLoader.php +383 -0
- data/vendor/composer/autoload_classmap.php +9 -0
- data/vendor/composer/autoload_namespaces.php +12 -0
- data/vendor/composer/autoload_psr4.php +10 -0
- data/vendor/composer/autoload_real.php +50 -0
- data/vendor/composer/installed.json +166 -0
- data/vendor/michelf/php-markdown/License.md +36 -0
- data/vendor/michelf/php-markdown/Michelf/Markdown.inc.php +10 -0
- data/vendor/michelf/php-markdown/Michelf/Markdown.php +3117 -0
- data/vendor/michelf/php-markdown/Michelf/MarkdownExtra.inc.php +11 -0
- data/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php +38 -0
- data/vendor/michelf/php-markdown/Michelf/MarkdownInterface.inc.php +9 -0
- data/vendor/michelf/php-markdown/Michelf/MarkdownInterface.php +37 -0
- data/vendor/michelf/php-markdown/Readme.md +305 -0
- data/vendor/michelf/php-markdown/Readme.php +31 -0
- data/vendor/michelf/php-markdown/composer.json +31 -0
- data/vendor/mthaml/mthaml/CHANGELOG +48 -0
- data/vendor/mthaml/mthaml/LICENSE +44 -0
- data/vendor/mthaml/mthaml/README.markdown +262 -0
- data/vendor/mthaml/mthaml/composer.json +45 -0
- data/vendor/mthaml/mthaml/docs/Makefile +153 -0
- data/vendor/mthaml/mthaml/docs/_static/mthaml.css +30 -0
- data/vendor/mthaml/mthaml/docs/_theme/mthaml/theme.conf +4 -0
- data/vendor/mthaml/mthaml/docs/conf.py +242 -0
- data/vendor/mthaml/mthaml/docs/index.rst +18 -0
- data/vendor/mthaml/mthaml/docs/twig-syntax.rst +274 -0
- data/vendor/mthaml/mthaml/examples/README.md +5 -0
- data/vendor/mthaml/mthaml/examples/autoload.php +8 -0
- data/vendor/mthaml/mthaml/examples/example-php.haml +5 -0
- data/vendor/mthaml/mthaml/examples/example-php.php +37 -0
- data/vendor/mthaml/mthaml/examples/example-twig-noext.twig +11 -0
- data/vendor/mthaml/mthaml/examples/example-twig.haml +9 -0
- data/vendor/mthaml/mthaml/examples/example-twig.php +60 -0
- data/vendor/mthaml/mthaml/examples/example.twig.haml +8 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Autoloader.php +22 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Environment.php +178 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Escaping.php +33 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Exception.php +9 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Exception/SyntaxErrorException.php +9 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/AbstractFilter.php +43 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Cdata.php +16 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/CoffeeScript.php +33 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Css.php +26 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php +22 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/FilterInterface.php +15 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Javascript.php +26 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Less.php +27 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Less/LeafoLess.php +20 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Less/OyejorgeLess.php +23 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown.php +58 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown/CebeMarkdown.php +22 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown/Ciconia.php +21 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown/MichelfMarkdown.php +21 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown/Parsedown.php +21 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Php.php +37 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Plain.php +24 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Preserve.php +19 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Scss.php +37 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Twig.php +47 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Indentation/Indentation.php +96 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Indentation/IndentationException.php +9 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Indentation/IndentationInterface.php +50 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Indentation/Undefined.php +41 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Comment.php +71 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Doctype.php +96 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/EscapableAbstract.php +19 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Filter.php +51 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Insert.php +42 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/InterpolatedString.php +73 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/NestAbstract.php +117 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/NestInterface.php +10 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/NodeAbstract.php +77 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php +42 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefId.php +42 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Root.php +35 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Run.php +71 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Statement.php +45 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Tag.php +90 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/TagAttribute.php +62 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/TagAttributeInterpolation.php +24 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/TagAttributeList.php +24 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Text.php +37 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/Autoclose.php +25 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/Escaping.php +105 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/MergeAttrs.php +110 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/Midblock.php +37 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/NodeVisitorAbstract.php +226 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/NodeVisitorInterface.php +97 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/PhpRenderer.php +288 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/Printer.php +265 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/RendererAbstract.php +581 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/TwigRenderer.php +252 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Parser.php +862 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Parser/Buffer.php +147 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Runtime.php +218 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Runtime/AttributeInterpolation.php +16 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Runtime/AttributeList.php +16 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Support/Php/Executor.php +157 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Support/Twig/Extension.php +47 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Support/Twig/Lexer.php +48 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Support/Twig/Loader.php +81 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Target/Php.php +23 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Target/TargetAbstract.php +87 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Target/TargetInterface.php +12 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Target/Twig.php +23 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/TreeBuilder.php +100 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/TreeBuilderException.php +9 -0
- data/vendor/mthaml/mthaml/phpunit.xml +25 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/EnvironmentTest.php +59 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/HamlSpecTest.php +83 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/IndentationTest.php +140 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/Node/DoctypeTest.php +51 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/Node/NodeTest.php +110 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/NodeVisitor/PhpRendererTest.php +113 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/NodeVisitor/TwigRendererTest.php +68 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/NodeVisitorsTest.php +44 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/Parser/BufferTest.php +77 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/ParserTest.php +47 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/RuntimeTest.php +356 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/Support/Php/ExecutorTest.php +83 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/Support/Twig/LoaderTest.php +65 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/TestCase.php +49 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/TestCaseTest.php +50 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/Support/Php/Executor.001.haml +1 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test +20 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_twig.test +12 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/boolean_attr_php.test +16 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/boolean_attr_twig.test +16 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/bug28_php.test +15 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/bug28_twig.test +15 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/bug42.test +13 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/bug8_twig.test +10 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/coffeescript_filter.test +31 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/comments.test +26 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/cond_cmt.test +25 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype.test +18 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype_html4.test +20 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype_invalid.test +12 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype_invalid_xhtml.test +12 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype_php.test +18 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype_xhtml.test +30 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/filters.test +51 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/insert_non_echo_php.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/insert_non_echo_twig.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/interpolation_in_html_attrs_php.test +31 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/interpolation_in_html_attrs_twig.test +31 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/less_filter_leafo.test +33 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/less_filter_oyejorge.test +49 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_filter_cebemarkdown.test +35 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_filter_ciconia.test +36 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_filter_michelf.test +34 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_filter_parsedown.test +31 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_optimization_filter_michelf.test +23 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/mergeattrs.test +18 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/nuke_inner_whitespace.test +77 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/nuke_outer_whitespace.test +122 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/object_ref_php.test +14 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/object_ref_twig.test +14 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/php.test +109 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/php_autoescaping.test +22 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/php_autoescaping_once.test +25 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/php_blocks.test +29 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/php_filters.test +42 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/scss_filter.test +32 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/strip_inline_comments_php.test +22 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/test.test +24 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/trailing_semicolon_php.test +14 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/try_catch_php.test +17 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/twig.test +112 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/twig_blocks.test +29 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/twig_filters.test +37 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/twig_whitespace.test +32 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/whitespace.test +63 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/autoclose.test +30 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/escaping.test +52 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/escaping_attr_once.test +52 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/escaping_html_false.test +52 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/mergeattrs.test +26 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/midblock.test +54 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/midblock_002.test +32 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/attr_list.test +14 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/attrs.test +42 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/attrs_002.test +35 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/attrs_003.test +30 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/attrs_html_linebreak.test +17 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/blocks.test +27 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/blocks_002.test +15 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/boolean_attr.test +19 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/bug28.test +15 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/bug8.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/cond_cmt.test +23 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/doctype.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/double_equal.test +7 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/empty_line_after_multiline.test +10 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_001.test +8 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_002.test +8 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_003.test +8 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_004.test +6 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_005.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_006.test +7 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_007.test +7 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_008.test +7 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_009.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_010.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_013.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_016.test +7 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_017.test +8 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_018.test +6 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_019.test +6 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_020.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters.test +20 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters_002.test +19 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters_003.test +13 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters_004.test +21 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters_005.test +22 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters_006.test +23 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/insertflags.test +17 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/interpolation.test +36 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/interpolation_in_html_attrs.test +17 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/multiline.test +18 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/multiline_code.test +59 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/multiple_attr_kinds.test +47 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/non_rendered_comment.test +31 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ns.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/object_ref.test +22 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/object_ref_error1.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/object_ref_error2.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/quotes_in_haml.test +10 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ruby19_attrs.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ruby_attrs_comma.test +23 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ruby_attrs_comma_errors_001.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ruby_attrs_comma_errors_002.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ruby_attrs_comma_errors_003.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/standard.test +114 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/tagflags.test +39 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test +28 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test +31 -0
- data/vendor/mthaml/mthaml/test/bootstrap.php +3 -0
- metadata +398 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
--FILE--
|
2
|
+
<?php
|
3
|
+
$filter = new MtHaml\Filter\Markdown\MichelfMarkdown(new Michelf\MarkdownExtra);
|
4
|
+
$env = new MtHaml\Environment('twig', array('enable_escaper' => false), array('markdown' => $filter));
|
5
|
+
echo $env->compileString($parts['HAML'], "$file.haml");
|
6
|
+
|
7
|
+
--HAML--
|
8
|
+
:markdown
|
9
|
+
## Header
|
10
|
+
|
11
|
+
Foo *c*
|
12
|
+
|
13
|
+
* list
|
14
|
+
:markdown
|
15
|
+
## #{header}
|
16
|
+
|
17
|
+
Foo *c*
|
18
|
+
|
19
|
+
* list
|
20
|
+
--EXPECT--
|
21
|
+
<h2>Header</h2>
|
22
|
+
|
23
|
+
<p>Foo <em>c</em></p>
|
24
|
+
|
25
|
+
<ul>
|
26
|
+
<li>list</li>
|
27
|
+
</ul>
|
28
|
+
{% filter mthaml_markdown %}## {{ header }}
|
29
|
+
|
30
|
+
Foo *c*
|
31
|
+
|
32
|
+
* list
|
33
|
+
{% endfilter %}
|
34
|
+
|
data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_filter_parsedown.test
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
--FILE--
|
2
|
+
<?php
|
3
|
+
$filter = new MtHaml\Filter\Markdown\Parsedown(new Parsedown);
|
4
|
+
$env = new MtHaml\Environment('twig', array('enable_escaper' => false), array('markdown' => $filter));
|
5
|
+
echo $env->compileString($parts['HAML'], "$file.haml");
|
6
|
+
|
7
|
+
--HAML--
|
8
|
+
:markdown
|
9
|
+
## Header
|
10
|
+
|
11
|
+
Foo *c*
|
12
|
+
|
13
|
+
* list
|
14
|
+
:markdown
|
15
|
+
## #{header}
|
16
|
+
|
17
|
+
Foo *c*
|
18
|
+
|
19
|
+
* list
|
20
|
+
--EXPECT--
|
21
|
+
<h2>Header</h2>
|
22
|
+
<p>Foo <em>c</em></p>
|
23
|
+
<ul>
|
24
|
+
<li>list</li>
|
25
|
+
</ul>{% filter mthaml_markdown %}## {% line 8 %}{{ header }}
|
26
|
+
|
27
|
+
Foo *c*
|
28
|
+
|
29
|
+
* list
|
30
|
+
{% endfilter %}
|
31
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
--FILE--
|
2
|
+
<?php
|
3
|
+
$filter = new MtHaml\Filter\Markdown\MichelfMarkdown(new Michelf\MarkdownExtra, true);
|
4
|
+
$env = new MtHaml\Environment('twig', array('enable_escaper' => false), array('markdown' => $filter));
|
5
|
+
echo $env->compileString($parts['HAML'], "$file.haml");
|
6
|
+
|
7
|
+
--HAML--
|
8
|
+
:markdown
|
9
|
+
## Header
|
10
|
+
|
11
|
+
Foo *c*
|
12
|
+
:markdown
|
13
|
+
## #{header}
|
14
|
+
|
15
|
+
Foo *c*
|
16
|
+
--EXPECT--
|
17
|
+
<h2>Header</h2>
|
18
|
+
|
19
|
+
<p>Foo <em>c</em></p>
|
20
|
+
<h2>{% line 6 %}{{ header }}</h2>
|
21
|
+
|
22
|
+
<p>Foo <em>c</em></p>
|
23
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
--FILE--
|
2
|
+
<?php
|
3
|
+
$env = new MtHaml\Environment('twig', array('enable_escaper' => false));
|
4
|
+
echo $env->compileString($parts['HAML'], "$file.haml");
|
5
|
+
|
6
|
+
--HAML--
|
7
|
+
|
8
|
+
.foo.bar.baz
|
9
|
+
|
10
|
+
#id.foo.bar{"class" => "abc #{def}", "id" => "x"}
|
11
|
+
|
12
|
+
%p{:a => "b", :a => "c"}
|
13
|
+
|
14
|
+
--EXPECT--
|
15
|
+
<div class="foo bar baz"></div>
|
16
|
+
<div {% line 4 %}{{ mthaml_attributes([['class', ('foo' ~ ' ' ~ 'bar')], ['class', ('abc ' ~ def)], ['id', 'x']], 'html5', 'UTF-8', false)|raw }}></div>
|
17
|
+
<p a="c"></p>
|
18
|
+
|
@@ -0,0 +1,77 @@
|
|
1
|
+
--FILE--
|
2
|
+
<?php
|
3
|
+
$env = new MtHaml\Environment('twig', array('enable_escaper' => false));
|
4
|
+
echo $env->compileString($parts['HAML'], "$file.haml");
|
5
|
+
|
6
|
+
--HAML--
|
7
|
+
%p
|
8
|
+
%q< Foo
|
9
|
+
%p
|
10
|
+
%q{:a => 1 + 1}< Foo
|
11
|
+
%p
|
12
|
+
%q< Foo Bar
|
13
|
+
%p
|
14
|
+
%q{:a => 1 + 1}< Foo Bar
|
15
|
+
%p
|
16
|
+
%q<
|
17
|
+
Foo
|
18
|
+
Bar
|
19
|
+
%p
|
20
|
+
%q{:a => 1 + 1}<
|
21
|
+
Foo
|
22
|
+
Bar
|
23
|
+
%p
|
24
|
+
%q<
|
25
|
+
%div
|
26
|
+
Foo
|
27
|
+
Bar
|
28
|
+
%p
|
29
|
+
%q{:a => 1 + 1}<
|
30
|
+
%div
|
31
|
+
Foo
|
32
|
+
Bar
|
33
|
+
|
34
|
+
%p
|
35
|
+
%q< foo
|
36
|
+
%q{:a => 1 + 1}
|
37
|
+
bar
|
38
|
+
--EXPECT--
|
39
|
+
<p>
|
40
|
+
<q>Foo</q>
|
41
|
+
</p>
|
42
|
+
<p>
|
43
|
+
<q {% line 4 %}{{ mthaml_attributes([['a', (1 + 1)]], 'html5', 'UTF-8', false)|raw }}>Foo</q>
|
44
|
+
</p>
|
45
|
+
<p>
|
46
|
+
<q>Foo Bar</q>
|
47
|
+
</p>
|
48
|
+
<p>
|
49
|
+
<q {% line 8 %}{{ mthaml_attributes([['a', (1 + 1)]], 'html5', 'UTF-8', false)|raw }}>Foo Bar</q>
|
50
|
+
</p>
|
51
|
+
<p>
|
52
|
+
<q>Foo
|
53
|
+
Bar</q>
|
54
|
+
</p>
|
55
|
+
<p>
|
56
|
+
<q {% line 14 %}{{ mthaml_attributes([['a', (1 + 1)]], 'html5', 'UTF-8', false)|raw }}>Foo
|
57
|
+
Bar</q>
|
58
|
+
</p>
|
59
|
+
<p>
|
60
|
+
<q><div>
|
61
|
+
Foo
|
62
|
+
Bar
|
63
|
+
</div></q>
|
64
|
+
</p>
|
65
|
+
<p>
|
66
|
+
<q {% line 23 %}{{ mthaml_attributes([['a', (1 + 1)]], 'html5', 'UTF-8', false)|raw }}><div>
|
67
|
+
Foo
|
68
|
+
Bar
|
69
|
+
</div></q>
|
70
|
+
</p>
|
71
|
+
<p>
|
72
|
+
<q>foo</q>
|
73
|
+
<q {{ mthaml_attributes([['a', (1 + 1)]], 'html5', 'UTF-8', false)|raw }}>
|
74
|
+
bar
|
75
|
+
</q>
|
76
|
+
</p>
|
77
|
+
|
@@ -0,0 +1,122 @@
|
|
1
|
+
--FILE--
|
2
|
+
<?php
|
3
|
+
$env = new MtHaml\Environment('twig', array('enable_escaper' => false));
|
4
|
+
echo $env->compileString($parts['HAML'], "$file.haml");
|
5
|
+
|
6
|
+
--HAML--
|
7
|
+
%p
|
8
|
+
%p
|
9
|
+
%q>
|
10
|
+
Foo
|
11
|
+
%p
|
12
|
+
%p
|
13
|
+
%q(a="2")>
|
14
|
+
Foo
|
15
|
+
%p
|
16
|
+
%p
|
17
|
+
%q> Foo
|
18
|
+
%p
|
19
|
+
%p
|
20
|
+
%q(a="3")> Foo
|
21
|
+
%p
|
22
|
+
%p
|
23
|
+
%q>
|
24
|
+
Foo
|
25
|
+
%p
|
26
|
+
%p
|
27
|
+
%q(a="4")>
|
28
|
+
Foo
|
29
|
+
%p
|
30
|
+
%p
|
31
|
+
%q>Foo
|
32
|
+
%p
|
33
|
+
%p
|
34
|
+
%q(a="5")>Foo
|
35
|
+
%p
|
36
|
+
%p
|
37
|
+
%q>
|
38
|
+
Foo Bar
|
39
|
+
%p
|
40
|
+
%p
|
41
|
+
%q(a="6")>
|
42
|
+
Foo Bar
|
43
|
+
%p
|
44
|
+
%p
|
45
|
+
%q>Foo Bar
|
46
|
+
%p
|
47
|
+
%p
|
48
|
+
%q(a="7")>Foo Bar
|
49
|
+
%p
|
50
|
+
%p
|
51
|
+
%q>
|
52
|
+
%p
|
53
|
+
%p
|
54
|
+
%q>/
|
55
|
+
%p
|
56
|
+
%p
|
57
|
+
%q(a="2")>
|
58
|
+
%p
|
59
|
+
%p
|
60
|
+
%q(a="2")>/
|
61
|
+
--EXPECT--
|
62
|
+
<p>
|
63
|
+
<p><q>
|
64
|
+
Foo
|
65
|
+
</q></p>
|
66
|
+
</p>
|
67
|
+
<p>
|
68
|
+
<p><q a="2">
|
69
|
+
Foo
|
70
|
+
</q></p>
|
71
|
+
</p>
|
72
|
+
<p>
|
73
|
+
<p><q>Foo</q></p>
|
74
|
+
</p>
|
75
|
+
<p>
|
76
|
+
<p><q a="3">Foo</q></p>
|
77
|
+
</p>
|
78
|
+
<p>
|
79
|
+
<p><q>
|
80
|
+
Foo
|
81
|
+
</q></p>
|
82
|
+
</p>
|
83
|
+
<p>
|
84
|
+
<p><q a="4">
|
85
|
+
Foo
|
86
|
+
</q></p>
|
87
|
+
</p>
|
88
|
+
<p>
|
89
|
+
<p><q>Foo</q></p>
|
90
|
+
</p>
|
91
|
+
<p>
|
92
|
+
<p><q a="5">Foo</q></p>
|
93
|
+
</p>
|
94
|
+
<p>
|
95
|
+
<p><q>
|
96
|
+
Foo Bar
|
97
|
+
</q></p>
|
98
|
+
</p>
|
99
|
+
<p>
|
100
|
+
<p><q a="6">
|
101
|
+
Foo Bar
|
102
|
+
</q></p>
|
103
|
+
</p>
|
104
|
+
<p>
|
105
|
+
<p><q>Foo Bar</q></p>
|
106
|
+
</p>
|
107
|
+
<p>
|
108
|
+
<p><q a="7">Foo Bar</q></p>
|
109
|
+
</p>
|
110
|
+
<p>
|
111
|
+
<p><q></q></p>
|
112
|
+
</p>
|
113
|
+
<p>
|
114
|
+
<p><q></p>
|
115
|
+
</p>
|
116
|
+
<p>
|
117
|
+
<p><q a="2"></q></p>
|
118
|
+
</p>
|
119
|
+
<p>
|
120
|
+
<p><q a="2"></p>
|
121
|
+
</p>
|
122
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
--HAML--
|
2
|
+
%p[$a]
|
3
|
+
%p[$a, "b"]
|
4
|
+
%p[]
|
5
|
+
--FILE--
|
6
|
+
<?php
|
7
|
+
$env = new MtHaml\Environment('php', array('enable_escaper' => false));
|
8
|
+
echo $env->compileString($parts['HAML'], "$file.haml");
|
9
|
+
|
10
|
+
--EXPECT--
|
11
|
+
<p <?php echo MtHaml\Runtime::renderAttributes(array(array('class', MtHaml\Runtime::renderObjectRefClass($a)), array('id', MtHaml\Runtime::renderObjectRefId($a))), 'html5', 'UTF-8', false); ?>></p>
|
12
|
+
<p <?php echo MtHaml\Runtime::renderAttributes(array(array('class', MtHaml\Runtime::renderObjectRefClass($a, ("b"))), array('id', MtHaml\Runtime::renderObjectRefId($a, ("b")))), 'html5', 'UTF-8', false); ?>></p>
|
13
|
+
<p></p>
|
14
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
--HAML--
|
2
|
+
%p[a]
|
3
|
+
%p[a, "b"]
|
4
|
+
%p[]
|
5
|
+
--FILE--
|
6
|
+
<?php
|
7
|
+
$env = new MtHaml\Environment('twig', array('enable_escaper' => false));
|
8
|
+
echo $env->compileString($parts['HAML'], "$file.haml");
|
9
|
+
|
10
|
+
--EXPECT--
|
11
|
+
<p {{ mthaml_attributes([['class', mthaml_object_ref_class(a)], ['id', mthaml_object_ref_id(a)]], 'html5', 'UTF-8', false)|raw }}></p>
|
12
|
+
<p {{ mthaml_attributes([['class', mthaml_object_ref_class(a, ("b"))], ['id', mthaml_object_ref_id(a, ("b"))]], 'html5', 'UTF-8', false)|raw }}></p>
|
13
|
+
<p></p>
|
14
|
+
|
@@ -0,0 +1,109 @@
|
|
1
|
+
--FILE--
|
2
|
+
<?php
|
3
|
+
$env = new MtHaml\Environment('php', array('enable_escaper' => false));
|
4
|
+
echo $env->compileString($parts['HAML'], "$file.haml");
|
5
|
+
--HAML--
|
6
|
+
!!!
|
7
|
+
%html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en-US", "lang" => "en-US"}
|
8
|
+
%head
|
9
|
+
%title This is some title
|
10
|
+
%meta{"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8"}
|
11
|
+
%body
|
12
|
+
/ Hey, a comment!
|
13
|
+
.header
|
14
|
+
This is the header,
|
15
|
+
with multiple lines in it.
|
16
|
+
= 1 + 9 + 8 + 2
|
17
|
+
/
|
18
|
+
And now, a
|
19
|
+
= "multiline comment"
|
20
|
+
%p everything can be nested in comments
|
21
|
+
#body= " Hey I print something!"
|
22
|
+
- foreach(range(0, 4) as $number)
|
23
|
+
= $number
|
24
|
+
Wow.|
|
25
|
+
%p
|
26
|
+
= "Holy cow " . |
|
27
|
+
"multiline " . |
|
28
|
+
"tags! " . |
|
29
|
+
"A pipe (|) even!" |
|
30
|
+
= count(array(1, 2, 3, "|"))
|
31
|
+
= "Holy cow " . |
|
32
|
+
"multiline " . |
|
33
|
+
"tags! " |
|
34
|
+
%div.silent
|
35
|
+
- $foo = "this"
|
36
|
+
- $foo .= " shouldn't"
|
37
|
+
- $foo .= " be displayed"
|
38
|
+
= $foo . " but now it should!"
|
39
|
+
-# Woah crap a non rendered comment!
|
40
|
+
|
41
|
+
-# That was a line that shouldn't close everything.
|
42
|
+
\= Escape
|
43
|
+
%ul.really.cool
|
44
|
+
- foreach(range("a", "f") as $a)
|
45
|
+
%li= $a
|
46
|
+
#combo.of_divs_with_underscore= "with this text"
|
47
|
+
#escaping-test
|
48
|
+
= "this is not escaped"
|
49
|
+
&= "this is escaped"
|
50
|
+
!= "this is forcibly not escaped"
|
51
|
+
.footer
|
52
|
+
%strong.shout= "footer"
|
53
|
+
<?php here should not be executed <
|
54
|
+
? neither here
|
55
|
+
--EXPECT--
|
56
|
+
<!DOCTYPE html>
|
57
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
|
58
|
+
<head>
|
59
|
+
<title>This is some title</title>
|
60
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
61
|
+
</head>
|
62
|
+
<body>
|
63
|
+
<!-- Hey, a comment! -->
|
64
|
+
<div class="header">
|
65
|
+
This is the header,
|
66
|
+
with multiple lines in it.
|
67
|
+
<?php echo 1 + 9 + 8 + 2; ?>
|
68
|
+
</div>
|
69
|
+
<!--
|
70
|
+
And now, a
|
71
|
+
<?php echo "multiline comment"; ?>
|
72
|
+
<p>everything can be nested in comments</p>
|
73
|
+
-->
|
74
|
+
<div id="body"><?php echo " Hey I print something!"; ?></div>
|
75
|
+
<?php foreach(range(0, 4) as $number) { ?>
|
76
|
+
<?php echo $number; ?>
|
77
|
+
<?php } ?>
|
78
|
+
Wow.|
|
79
|
+
<p>
|
80
|
+
<?php echo "Holy cow " . "multiline " . "tags! " . "A pipe (|) even!" ; ?>
|
81
|
+
<?php echo count(array(1, 2, 3, "|")); ?>
|
82
|
+
<?php echo "Holy cow " . "multiline " . "tags! " ; ?>
|
83
|
+
</p>
|
84
|
+
<div class="silent">
|
85
|
+
<?php $foo = "this"; ?>
|
86
|
+
<?php $foo .= " shouldn't"; ?>
|
87
|
+
<?php $foo .= " be displayed"; ?>
|
88
|
+
<?php echo $foo . " but now it should!"; ?>
|
89
|
+
</div>
|
90
|
+
= Escape
|
91
|
+
<ul class="really cool">
|
92
|
+
<?php foreach(range("a", "f") as $a) { ?>
|
93
|
+
<li><?php echo $a; ?></li>
|
94
|
+
<?php } ?>
|
95
|
+
</ul>
|
96
|
+
<div id="combo" class="of_divs_with_underscore"><?php echo "with this text"; ?></div>
|
97
|
+
<div id="escaping-test">
|
98
|
+
<?php echo "this is not escaped"; ?>
|
99
|
+
<?php echo htmlspecialchars("this is escaped",ENT_QUOTES,'UTF-8'); ?>
|
100
|
+
<?php echo "this is forcibly not escaped"; ?>
|
101
|
+
</div>
|
102
|
+
<div class="footer">
|
103
|
+
<strong class="shout"><?php echo "footer"; ?></strong>
|
104
|
+
<?php echo '<?'; ?>php here should not be executed <
|
105
|
+
? neither here
|
106
|
+
</div>
|
107
|
+
</body>
|
108
|
+
</html>
|
109
|
+
|