diff --git a/changelog.txt b/CHANGELOG.txt similarity index 100% rename from changelog.txt rename to CHANGELOG.txt diff --git a/license.txt b/LICENSE.txt similarity index 100% rename from license.txt rename to LICENSE.txt diff --git a/content/index.html b/content/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/index.php b/index.php index d89eed7..2f49bdd 100644 --- a/index.php +++ b/index.php @@ -8,6 +8,6 @@ define('PLUGINS_DIR', ROOT_DIR .'plugins/'); define('THEMES_DIR', ROOT_DIR .'themes/'); define('CACHE_DIR', LIB_DIR .'cache/'); -require(ROOT_DIR .'vendor/autoload.php'); +require(LIB_DIR .'autoload.php'); require(LIB_DIR .'pico.php'); $pico = new Pico(); diff --git a/vendor/autoload.php b/lib/autoload.php similarity index 100% rename from vendor/autoload.php rename to lib/autoload.php diff --git a/vendor/composer/ClassLoader.php b/lib/composer/ClassLoader.php similarity index 100% rename from vendor/composer/ClassLoader.php rename to lib/composer/ClassLoader.php diff --git a/vendor/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php similarity index 100% rename from vendor/composer/autoload_classmap.php rename to lib/composer/autoload_classmap.php diff --git a/vendor/composer/autoload_namespaces.php b/lib/composer/autoload_namespaces.php similarity index 100% rename from vendor/composer/autoload_namespaces.php rename to lib/composer/autoload_namespaces.php diff --git a/vendor/composer/autoload_real.php b/lib/composer/autoload_real.php similarity index 100% rename from vendor/composer/autoload_real.php rename to lib/composer/autoload_real.php diff --git a/vendor/composer/installed.json b/lib/composer/installed.json similarity index 100% rename from vendor/composer/installed.json rename to lib/composer/installed.json diff --git a/lib/index.html b/lib/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/lib/markdown/LICENSE b/lib/markdown/LICENSE new file mode 100644 index 0000000..5ba3dec --- /dev/null +++ b/lib/markdown/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2013 Egil Hansen (http://egilhansen.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/lib/markdown/README.md b/lib/markdown/README.md new file mode 100644 index 0000000..7c2b82d --- /dev/null +++ b/lib/markdown/README.md @@ -0,0 +1,128 @@ +# PHP Markdown Extra Extended + +An fork of the [PHP Markdown (Extra) project](http://michelf.com/projects/php-markdown/) (PME), extended with extra syntax, especially focused on adding support for more HTML attributes to outputted HTML, and for outputting HTML5. + +## Changes to syntax from PHP Markdown (Extra) +Unless explicitly specified, existing Markdown markup works exactly as it did before. The orginal syntax is documentated here: + +- [Markdown syntax](http://daringfireball.net/projects/markdown/syntax) +- [Markdown Extra syntax](http://michelf.com/projects/php-markdown/extra/) + +### Line break generates a `
` +In PME, when you want to insert a `
` break tag using Markdown, you end a line with two or more spaces, then type return. This turned out to be more annoying than helpful in my projects, so now you just have to type return. This is also how Markdown works with GFM. + +Two returns does not insert a `
`, but instead creates a new paragraph as usual. + +### Support for *cite* attribute on blockquotes +It is now possible to add the optional *cite* attribute to the *blockquote* element. + +The new, optional, syntax is: + +```markdown +> (cite url) Cited content follows ... +``` + +#### Example: + +```markdown +> (http://www.whatwg.org/) Content inside a blockquote must be quoted +> from another source, whose address, if it has one, +> may be cited in the `cite` attribute. +``` + +Will result in the following HTML: + +```html +
+

Content inside a blockquote must be quoted +from another source, whose address, if it has one, +may be cited in the `cite` attribute.

+
+``` + +#### Breaking changes from PME +The existing rules for and [formatting options](http://daringfireball.net/projects/markdown/syntax#blockquote) for blockquotes still apply. There is one small breaking changes with this addition. If your quote starts with "(" you have two have at least two spaces between the initial ">" and the "(". E.g.: + +```markdown +> (Ut brisket flank salami.) Cow cupidatat ex t-bone sirloin id. +> Sunt flank pastrami spare ribs sint id, nulla nisi. +``` + +Will result in the following HTML: + +```html +
+

(Ut brisket flank salami.) Cow cupidatat ex t-bone sirloin id.
+ Sunt flank pastrami spare ribs sint id, nulla nisi.

+
+``` + +### Fenced code block with language support and alternating fence markers (```) +It is now possible to specify the language type of a code block, and use an alternatinge fence markers (```), enabling the same syntax as that of GFM. + +This addition follows the [suggested way](http://dev.w3.org/html5/spec-author-view/the-code-element.html#the-code-element) to specify language by W3C. + +#### Example: + + ~~~html +

Ut brisket flank salami. Cow cupidatat ex t-bone sirloin id.

+ ~~~ + +Using alternative fence markers: + + ```html +

Ut brisket flank salami. Cow cupidatat ex t-bone sirloin id.

+ ``` + +Both will output the following HTML: + +```HTML +

+

Ut brisket flank salami. Cow cupidatat ex t-bone sirloin id.

+
+``` + +### Support for *figure* and *figcaption* tags +There is now experimental support for the the HTML5 tags *[figure](http://dev.w3.org/html5/markup/figure.html)* and *[figcaption](http://dev.w3.org/html5/markup/figcaption.html)*. + +A *figure* is a block level element and is created by wrapping some other content in three or more equal (=) signs. + +A optional *figure caption* can be added to either the top of the figure or the bottom at the figure, right after the equal signs, wrapped in [ and ] signs. + +#### Examples +This example shows a *figure* without a caption: + +```markdown +=== +![](img/reference.png) +=== +``` + +This example shows a *figure* with a caption added before the content: + +```markdown +=== [A **happy face** is good for web developers] +![](img/reference.png) +=== +``` + +This example shows a *figure* with a caption added after the content: + +```markdown +=== +![](img/reference.png) +=== [A **happy face** is good for web developers] +``` + +## Usage +You need both the *markdown.php* and the *markdown_extended.php* files, but only needs to include *markdown_extended.php*. + +```PHP +require_once('markdown_extended.php'); + +// Convert markdown formatted text in $markdown to HTML +$html = MarkdownExtended($markdown); +``` + +## License +PHP Markdown Extra Extended is licensed under the [MIT License](http://opensource.org/licenses/MIT). See the LICENSE file for details. \ No newline at end of file diff --git a/lib/markdown/composer.json b/lib/markdown/composer.json new file mode 100644 index 0000000..d4d86ac --- /dev/null +++ b/lib/markdown/composer.json @@ -0,0 +1,14 @@ +{ + "name": "egil/php-markdown-extra-extended", + "type": "library", + "description": "PHP Markdown Extra Extended", + "homepage": "https://github.com/egil/php-markdown-extra-extended", + "keywords": ["markdown"], + "license": "MIT", + "require": { + "php": ">=5.3" + }, + "autoload": { + "files": ["markdown.php", "markdown_extended.php"] + } +} diff --git a/vendor/michelf/php-markdown/Michelf/Markdown.php b/lib/markdown/markdown.php similarity index 76% rename from vendor/michelf/php-markdown/Michelf/Markdown.php rename to lib/markdown/markdown.php index 094b0ee..ee3dddb 100644 --- a/vendor/michelf/php-markdown/Michelf/Markdown.php +++ b/lib/markdown/markdown.php @@ -1,81 +1,245 @@ # -# Original Markdown +# Original Markdown # Copyright (c) 2004-2006 John Gruber # # -namespace Michelf; + + +define( 'MARKDOWN_VERSION', "1.0.1n" ); # Sat 10 Oct 2009 +define( 'MARKDOWNEXTRA_VERSION', "1.2.4" ); # Sat 10 Oct 2009 + + +# +# Global default settings: +# + +# Change to ">" for HTML output +@define( 'MARKDOWN_EMPTY_ELEMENT_SUFFIX', " />"); + +# Define the width of a tab for code blocks. +@define( 'MARKDOWN_TAB_WIDTH', 4 ); + +# Optional title attribute for footnote links and backlinks. +@define( 'MARKDOWN_FN_LINK_TITLE', "" ); +@define( 'MARKDOWN_FN_BACKLINK_TITLE', "" ); + +# Optional class attribute for footnote links and backlinks. +@define( 'MARKDOWN_FN_LINK_CLASS', "" ); +@define( 'MARKDOWN_FN_BACKLINK_CLASS', "" ); + + +# +# WordPress settings: +# + +# Change to false to remove Markdown from posts and/or comments. +@define( 'MARKDOWN_WP_POSTS', true ); +@define( 'MARKDOWN_WP_COMMENTS', true ); + + + +### Standard Function Interface ### + +@define( 'MARKDOWN_PARSER_CLASS', 'MarkdownExtra_Parser' ); + +function Markdown($text) { +# +# Initialize the parser and return the result of its transform method. +# + # Setup static parser variable. + static $parser; + if (!isset($parser)) { + $parser_class = MARKDOWN_PARSER_CLASS; + $parser = new $parser_class; + } + + # Transform text using parser. + return $parser->transform($text); +} + + +### WordPress Plugin Interface ### + +/* +Plugin Name: Markdown Extra +Plugin URI: http://michelf.com/projects/php-markdown/ +Description: Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More... +Version: 1.2.4 +Author: Michel Fortin +Author URI: http://michelf.com/ +*/ + +if (isset($wp_version)) { + # More details about how it works here: + # + + # Post content and excerpts + # - Remove WordPress paragraph generator. + # - Run Markdown on excerpt, then remove all tags. + # - Add paragraph tag around the excerpt, but remove it for the excerpt rss. + if (MARKDOWN_WP_POSTS) { + remove_filter('the_content', 'wpautop'); + remove_filter('the_content_rss', 'wpautop'); + remove_filter('the_excerpt', 'wpautop'); + add_filter('the_content', 'mdwp_MarkdownPost', 6); + add_filter('the_content_rss', 'mdwp_MarkdownPost', 6); + add_filter('get_the_excerpt', 'mdwp_MarkdownPost', 6); + add_filter('get_the_excerpt', 'trim', 7); + add_filter('the_excerpt', 'mdwp_add_p'); + add_filter('the_excerpt_rss', 'mdwp_strip_p'); + + remove_filter('content_save_pre', 'balanceTags', 50); + remove_filter('excerpt_save_pre', 'balanceTags', 50); + add_filter('the_content', 'balanceTags', 50); + add_filter('get_the_excerpt', 'balanceTags', 9); + } + + # Add a footnote id prefix to posts when inside a loop. + function mdwp_MarkdownPost($text) { + static $parser; + if (!$parser) { + $parser_class = MARKDOWN_PARSER_CLASS; + $parser = new $parser_class; + } + if (is_single() || is_page() || is_feed()) { + $parser->fn_id_prefix = ""; + } else { + $parser->fn_id_prefix = get_the_ID() . "."; + } + return $parser->transform($text); + } + + # Comments + # - Remove WordPress paragraph generator. + # - Remove WordPress auto-link generator. + # - Scramble important tags before passing them to the kses filter. + # - Run Markdown on excerpt then remove paragraph tags. + if (MARKDOWN_WP_COMMENTS) { + remove_filter('comment_text', 'wpautop', 30); + remove_filter('comment_text', 'make_clickable'); + add_filter('pre_comment_content', 'Markdown', 6); + add_filter('pre_comment_content', 'mdwp_hide_tags', 8); + add_filter('pre_comment_content', 'mdwp_show_tags', 12); + add_filter('get_comment_text', 'Markdown', 6); + add_filter('get_comment_excerpt', 'Markdown', 6); + add_filter('get_comment_excerpt', 'mdwp_strip_p', 7); + + global $mdwp_hidden_tags, $mdwp_placeholders; + $mdwp_hidden_tags = explode(' ', + '

 
  • '); + $mdwp_placeholders = explode(' ', str_rot13( + 'pEj07ZbbBZ U1kqgh4w4p pre2zmeN6K QTi31t9pre ol0MP1jzJR '. + 'ML5IjmbRol ulANi1NsGY J7zRLJqPul liA8ctl16T K9nhooUHli')); + } + + function mdwp_add_p($text) { + if (!preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) { + $text = '

    '.$text.'

    '; + $text = preg_replace('{\n{2,}}', "

    \n\n

    ", $text); + } + return $text; + } + + function mdwp_strip_p($t) { return preg_replace('{}i', '', $t); } + + function mdwp_hide_tags($text) { + global $mdwp_hidden_tags, $mdwp_placeholders; + return str_replace($mdwp_hidden_tags, $mdwp_placeholders, $text); + } + function mdwp_show_tags($text) { + global $mdwp_hidden_tags, $mdwp_placeholders; + return str_replace($mdwp_placeholders, $mdwp_hidden_tags, $text); + } +} + + +### bBlog Plugin Info ### + +function identify_modifier_markdown() { + return array( + 'name' => 'markdown', + 'type' => 'modifier', + 'nicename' => 'PHP Markdown Extra', + 'description' => 'A text-to-HTML conversion tool for web writers', + 'authors' => 'Michel Fortin and John Gruber', + 'licence' => 'GPL', + 'version' => MARKDOWNEXTRA_VERSION, + 'help' => 'Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More...', + ); +} + + +### Smarty Modifier Interface ### + +function smarty_modifier_markdown($text) { + return Markdown($text); +} + + +### Textile Compatibility Mode ### + +# Rename this file to "classTextile.php" and it can replace Textile everywhere. + +if (strcasecmp(substr(__FILE__, -16), "classTextile.php") == 0) { + # Try to include PHP SmartyPants. Should be in the same directory. + @include_once 'smartypants.php'; + # Fake Textile class. It calls Markdown instead. + class Textile { + function TextileThis($text, $lite='', $encode='') { + if ($lite == '' && $encode == '') $text = Markdown($text); + if (function_exists('SmartyPants')) $text = SmartyPants($text); + return $text; + } + # Fake restricted version: restrictions are not supported for now. + function TextileRestricted($text, $lite='', $noimage='') { + return $this->TextileThis($text, $lite); + } + # Workaround to ensure compatibility with TextPattern 4.0.3. + function blockLite($text) { return $text; } + } +} + # # Markdown Parser Class # -class Markdown { - - ### Version ### - - const MARKDOWNLIB_VERSION = "1.3"; - - ### Simple Function Interface ### - - public static function defaultTransform($text) { - # - # Initialize the parser and return the result of its transform method. - # This will work fine for derived classes too. - # - # Take parser class on which this function was called. - $parser_class = \get_called_class(); - - # try to take parser from the static parser list - static $parser_list; - $parser =& $parser_list[$parser_class]; - - # create the parser it not already set - if (!$parser) - $parser = new $parser_class; - - # Transform text using parser. - return $parser->transform($text); - } - - ### Configuration Variables ### - - # Change to ">" for HTML output. - public $empty_element_suffix = " />"; - public $tab_width = 4; - - # Change to `true` to disallow markup or entities. - public $no_markup = false; - public $no_entities = false; - - # Predefined urls and titles for reference links and images. - public $predef_urls = array(); - public $predef_titles = array(); - - - ### Parser Implementation ### +class Markdown_Parser { # Regex to match balanced [brackets]. # Needed to insert a maximum bracked depth while converting to PHP. - protected $nested_brackets_depth = 6; - protected $nested_brackets_re; + var $nested_brackets_depth = 6; + var $nested_brackets_re; - protected $nested_url_parenthesis_depth = 4; - protected $nested_url_parenthesis_re; + var $nested_url_parenthesis_depth = 4; + var $nested_url_parenthesis_re; # Table of hash values for escaped characters: - protected $escape_chars = '\`*_{}[]()>#+-.!'; - protected $escape_chars_re; + var $escape_chars = '\`*_{}[]()>#+-.!'; + var $escape_chars_re; + + # Change to ">" for HTML output. + var $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX; + var $tab_width = MARKDOWN_TAB_WIDTH; + + # Change to `true` to disallow markup or entities. + var $no_markup = false; + var $no_entities = false; + + # Predefined urls and titles for reference links and images. + var $predef_urls = array(); + var $predef_titles = array(); - public function __construct() { + function Markdown_Parser() { # # Constructor function. Initialize appropriate member variables. # @@ -100,15 +264,15 @@ class Markdown { # Internal hashes used during transformation. - protected $urls = array(); - protected $titles = array(); - protected $html_hashes = array(); + var $urls = array(); + var $titles = array(); + var $html_hashes = array(); # Status flag to avoid invalid nesting. - protected $in_anchor = false; + var $in_anchor = false; - protected function setup() { + function setup() { # # Called before the transformation process starts to setup parser # states. @@ -118,10 +282,10 @@ class Markdown { $this->titles = $this->predef_titles; $this->html_hashes = array(); - $this->in_anchor = false; + $in_anchor = false; } - protected function teardown() { + function teardown() { # # Called after the transformation process to clear any variable # which may be taking up memory unnecessarly. @@ -132,7 +296,7 @@ class Markdown { } - public function transform($text) { + function transform($text) { # # Main function. Performs some preprocessing on the input text # and pass it through the document gamut. @@ -171,7 +335,7 @@ class Markdown { return $text . "\n"; } - protected $document_gamut = array( + var $document_gamut = array( # Strip link definitions, store in hashes. "stripLinkDefinitions" => 20, @@ -179,7 +343,7 @@ class Markdown { ); - protected function stripLinkDefinitions($text) { + function stripLinkDefinitions($text) { # # Strips link definitions from text, stores the URLs and titles in # hash references. @@ -213,7 +377,7 @@ class Markdown { $text); return $text; } - protected function _stripLinkDefinitions_callback($matches) { + function _stripLinkDefinitions_callback($matches) { $link_id = strtolower($matches[1]); $url = $matches[2] == '' ? $matches[3] : $matches[2]; $this->urls[$link_id] = $url; @@ -222,7 +386,7 @@ class Markdown { } - protected function hashHTMLBlocks($text) { + function hashHTMLBlocks($text) { if ($this->no_markup) return $text; $less_than_tab = $this->tab_width - 1; @@ -242,9 +406,7 @@ class Markdown { # $block_tags_a_re = 'ins|del'; $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. - 'script|noscript|form|fieldset|iframe|math|svg|'. - 'article|section|nav|aside|hgroup|header|footer|'. - 'figure'; + 'script|noscript|form|fieldset|iframe|math'; # Regular expression for the content of a block tag. $nested_tags_level = 4; @@ -361,14 +523,14 @@ class Markdown { return $text; } - protected function _hashHTMLBlocks_callback($matches) { + function _hashHTMLBlocks_callback($matches) { $text = $matches[1]; $key = $this->hashBlock($text); return "\n\n$key\n\n"; } - protected function hashPart($text, $boundary = 'X') { + function hashPart($text, $boundary = 'X') { # # Called whenever a tag must be hashed when a function insert an atomic # element in the text stream. Passing $text to through this function gives @@ -391,7 +553,7 @@ class Markdown { } - protected function hashBlock($text) { + function hashBlock($text) { # # Shortcut function for hashPart with block-level boundaries. # @@ -399,7 +561,7 @@ class Markdown { } - protected $block_gamut = array( + var $block_gamut = array( # # These are all the transformations that form block-level # tags like paragraphs, headers, and list items. @@ -412,7 +574,7 @@ class Markdown { "doBlockQuotes" => 60, ); - protected function runBlockGamut($text) { + function runBlockGamut($text) { # # Run block gamut tranformations. # @@ -426,7 +588,7 @@ class Markdown { return $this->runBasicBlockGamut($text); } - protected function runBasicBlockGamut($text) { + function runBasicBlockGamut($text) { # # Run block gamut tranformations, without hashing HTML blocks. This is # useful when HTML blocks are known to be already hashed, like in the first @@ -443,7 +605,7 @@ class Markdown { } - protected function doHorizontalRules($text) { + function doHorizontalRules($text) { # Do Horizontal Rules: return preg_replace( '{ @@ -461,7 +623,7 @@ class Markdown { } - protected $span_gamut = array( + var $span_gamut = array( # # These are all the transformations that occur *within* block-level # tags like paragraphs, headers, and list items. @@ -485,7 +647,7 @@ class Markdown { "doHardBreaks" => 60, ); - protected function runSpanGamut($text) { + function runSpanGamut($text) { # # Run span gamut tranformations. # @@ -497,17 +659,17 @@ class Markdown { } - protected function doHardBreaks($text) { + function doHardBreaks($text) { # Do hard breaks: return preg_replace_callback('/ {2,}\n/', array(&$this, '_doHardBreaks_callback'), $text); } - protected function _doHardBreaks_callback($matches) { + function _doHardBreaks_callback($matches) { return $this->hashPart("empty_element_suffix\n"); } - protected function doAnchors($text) { + function doAnchors($text) { # # Turn Markdown link shortcuts into XHTML tags. # @@ -577,7 +739,7 @@ class Markdown { $this->in_anchor = false; return $text; } - protected function _doAnchors_reference_callback($matches) { + function _doAnchors_reference_callback($matches) { $whole_match = $matches[1]; $link_text = $matches[2]; $link_id =& $matches[3]; @@ -611,7 +773,7 @@ class Markdown { } return $result; } - protected function _doAnchors_inline_callback($matches) { + function _doAnchors_inline_callback($matches) { $whole_match = $matches[1]; $link_text = $this->runSpanGamut($matches[2]); $url = $matches[3] == '' ? $matches[4] : $matches[3]; @@ -632,7 +794,7 @@ class Markdown { } - protected function doImages($text) { + function doImages($text) { # # Turn Markdown image shortcuts into tags. # @@ -687,7 +849,7 @@ class Markdown { return $text; } - protected function _doImages_reference_callback($matches) { + function _doImages_reference_callback($matches) { $whole_match = $matches[1]; $alt_text = $matches[2]; $link_id = strtolower($matches[3]); @@ -715,7 +877,7 @@ class Markdown { return $result; } - protected function _doImages_inline_callback($matches) { + function _doImages_inline_callback($matches) { $whole_match = $matches[1]; $alt_text = $matches[2]; $url = $matches[3] == '' ? $matches[4] : $matches[3]; @@ -734,7 +896,7 @@ class Markdown { } - protected function doHeaders($text) { + function doHeaders($text) { # Setext-style headers: # Header 1 # ======== @@ -764,7 +926,7 @@ class Markdown { return $text; } - protected function _doHeaders_callback_setext($matches) { + function _doHeaders_callback_setext($matches) { # Terrible hack to check we haven't found an empty list item. if ($matches[2] == '-' && preg_match('{^-(?: |$)}', $matches[1])) return $matches[0]; @@ -773,14 +935,14 @@ class Markdown { $block = "".$this->runSpanGamut($matches[1]).""; return "\n" . $this->hashBlock($block) . "\n\n"; } - protected function _doHeaders_callback_atx($matches) { + function _doHeaders_callback_atx($matches) { $level = strlen($matches[1]); $block = "".$this->runSpanGamut($matches[2]).""; return "\n" . $this->hashBlock($block) . "\n\n"; } - protected function doLists($text) { + function doLists($text) { # # Form HTML ordered (numbered) and unordered (bulleted) lists. # @@ -788,7 +950,7 @@ class Markdown { # Re-usable patterns to match list item bullets and number markers: $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[\.]'; + $marker_ol_re = '\d+[.]'; $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; $markers_relist = array( @@ -846,10 +1008,10 @@ class Markdown { return $text; } - protected function _doLists_callback($matches) { + function _doLists_callback($matches) { # Re-usable patterns to match list item bullets and number markers: $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[\.]'; + $marker_ol_re = '\d+[.]'; $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; $list = $matches[1]; @@ -864,9 +1026,9 @@ class Markdown { return "\n". $result ."\n\n"; } - protected $list_level = 0; + var $list_level = 0; - protected function processListItems($list_str, $marker_any_re) { + function processListItems($list_str, $marker_any_re) { # # Process the contents of a single ordered or unordered list, splitting it # into individual list items. @@ -912,7 +1074,7 @@ class Markdown { $this->list_level--; return $list_str; } - protected function _processListItems_callback($matches) { + function _processListItems_callback($matches) { $item = $matches[4]; $leading_line =& $matches[1]; $leading_space =& $matches[2]; @@ -937,7 +1099,7 @@ class Markdown { } - protected function doCodeBlocks($text) { + function doCodeBlocks($text) { # # Process Markdown `

    ` blocks.
     	#
    @@ -955,7 +1117,7 @@ class Markdown {
     
     		return $text;
     	}
    -	protected function _doCodeBlocks_callback($matches) {
    +	function _doCodeBlocks_callback($matches) {
     		$codeblock = $matches[1];
     
     		$codeblock = $this->outdent($codeblock);
    @@ -969,7 +1131,7 @@ class Markdown {
     	}
     
     
    -	protected function makeCodeSpan($code) {
    +	function makeCodeSpan($code) {
     	#
     	# Create a code span markup for $code. Called from handleSpanToken.
     	#
    @@ -978,24 +1140,24 @@ class Markdown {
     	}
     
     
    -	protected $em_relist = array(
    -		''  => '(?:(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(?
    @@ -1155,7 +1317,7 @@ class Markdown {
     
     		return $text;
     	}
    -	protected function _doBlockQuotes_callback($matches) {
    +	function _doBlockQuotes_callback($matches) {
     		$bq = $matches[1];
     		# trim one level of quoting - trim whitespace-only lines
     		$bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq);
    @@ -1169,14 +1331,14 @@ class Markdown {
     
     		return "\n". $this->hashBlock("
    \n$bq\n
    ")."\n\n"; } - protected function _doBlockQuotes_callback2($matches) { + function _doBlockQuotes_callback2($matches) { $pre = $matches[1]; $pre = preg_replace('/^ /m', '', $pre); return $pre; } - protected function formParagraphs($text) { + function formParagraphs($text) { # # Params: # $text - string to process with html

    tags @@ -1246,7 +1408,7 @@ class Markdown { } - protected function encodeAttribute($text) { + function encodeAttribute($text) { # # Encode text for a double-quoted HTML attribute. This function # is *not* suitable for attributes enclosed in single quotes. @@ -1257,7 +1419,7 @@ class Markdown { } - protected function encodeAmpsAndAngles($text) { + function encodeAmpsAndAngles($text) { # # Smart processing for ampersands and angle brackets that need to # be encoded. Valid character entities are left alone unless the @@ -1278,7 +1440,7 @@ class Markdown { } - protected function doAutoLinks($text) { + function doAutoLinks($text) { $text = preg_replace_callback('{<((https?|ftp|dict):[^\'">\s]+)>}i', array(&$this, '_doAutoLinks_url_callback'), $text); @@ -1305,19 +1467,19 @@ class Markdown { return $text; } - protected function _doAutoLinks_url_callback($matches) { + function _doAutoLinks_url_callback($matches) { $url = $this->encodeAttribute($matches[1]); $link = "$url"; return $this->hashPart($link); } - protected function _doAutoLinks_email_callback($matches) { + function _doAutoLinks_email_callback($matches) { $address = $matches[1]; $link = $this->encodeEmailAddress($address); return $this->hashPart($link); } - protected function encodeEmailAddress($addr) { + function encodeEmailAddress($addr) { # # Input: an email address, e.g. "foo@example.com" # @@ -1358,7 +1520,7 @@ class Markdown { } - protected function parseSpan($str) { + function parseSpan($str) { # # Take the string $str and parse it into tokens, hashing embeded HTML, # escaped characters and handling code spans. @@ -1377,16 +1539,12 @@ class Markdown { | <\?.*?\?> | <%.*?%> # processing instruction | - <[!$]?[-a-zA-Z0-9:_]+ # regular tags + <[/!$]?[-a-zA-Z0-9:_]+ # regular tags (?> \s (?>[^"\'>]+|"[^"]*"|\'[^\']*\')* )? > - | - <[-a-zA-Z0-9:_]+\s*/> # xml-style empty tag - | - # closing tag ').' ) }xs'; @@ -1418,7 +1576,7 @@ class Markdown { } - protected function handleSpanToken($token, &$str) { + function handleSpanToken($token, &$str) { # # Handle $token provided by parseSpan by determining its nature and # returning the corresponding value that should replace it. @@ -1442,7 +1600,7 @@ class Markdown { } - protected function outdent($text) { + function outdent($text) { # # Remove one level of line-leading tabs or spaces # @@ -1452,9 +1610,9 @@ class Markdown { # String length function for detab. `_initDetab` will create a function to # hanlde UTF-8 if the default function does not exist. - protected $utf8_strlen = 'mb_strlen'; + var $utf8_strlen = 'mb_strlen'; - protected function detab($text) { + function detab($text) { # # Replace tabs with the appropriate amount of space. # @@ -1467,7 +1625,7 @@ class Markdown { return $text; } - protected function _detab_callback($matches) { + function _detab_callback($matches) { $line = $matches[0]; $strlen = $this->utf8_strlen; # strlen function for UTF-8. @@ -1484,7 +1642,7 @@ class Markdown { } return $line; } - protected function _initDetab() { + function _initDetab() { # # Check for the availability of the function in the `utf8_strlen` property # (initially `mb_strlen`). If the function is not available, create a @@ -1498,14 +1656,14 @@ class Markdown { } - protected function unhash($text) { + function unhash($text) { # # Swap back in all the tags hashed by _HashHTMLBlocks. # return preg_replace_callback('/(.)\x1A[0-9]+\1/', array(&$this, '_unhash_callback'), $text); } - protected function _unhash_callback($matches) { + function _unhash_callback($matches) { return $this->html_hashes[$matches[0]]; } @@ -1513,50 +1671,27 @@ class Markdown { # -# Temporary Markdown Extra Parser Implementation Class -# -# NOTE: DON'T USE THIS CLASS -# Currently the implementation of of Extra resides here in this temporary class. -# This makes it easier to propagate the changes between the three different -# packaging styles of PHP Markdown. When this issue is resolved, this -# MarkdownExtra_TmpImpl class here will disappear and \Michelf\MarkdownExtra -# will contain the code. So please use \Michelf\MarkdownExtra and ignore this -# one. +# Markdown Extra Parser Class # -class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { - - ### Configuration Variables ### +class MarkdownExtra_Parser extends Markdown_Parser { # Prefix for footnote ids. - public $fn_id_prefix = ""; + var $fn_id_prefix = ""; # Optional title attribute for footnote links and backlinks. - public $fn_link_title = ""; - public $fn_backlink_title = ""; + var $fn_link_title = MARKDOWN_FN_LINK_TITLE; + var $fn_backlink_title = MARKDOWN_FN_BACKLINK_TITLE; # Optional class attribute for footnote links and backlinks. - public $fn_link_class = "footnote-ref"; - public $fn_backlink_class = "footnote-backref"; - - # Class name for table cell alignment (%% replaced left/center/right) - # For instance: 'go-%%' becomes 'go-left' or 'go-right' or 'go-center' - # If empty, the align attribute is used instead of a class name. - public $table_align_class_tmpl = ''; - - # Optional class prefix for fenced code block. - public $code_class_prefix = ""; - # Class attribute for code blocks goes on the `code` tag; - # setting this to true will put attributes on the `pre` tag instead. - public $code_attr_on_pre = false; + var $fn_link_class = MARKDOWN_FN_LINK_CLASS; + var $fn_backlink_class = MARKDOWN_FN_BACKLINK_CLASS; # Predefined abbreviations. - public $predef_abbr = array(); + var $predef_abbr = array(); - ### Parser Implementation ### - - public function __construct() { + function MarkdownExtra_Parser() { # # Constructor function. Initialize the parser object. # @@ -1582,23 +1717,21 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { "doAbbreviations" => 70, ); - parent::__construct(); + parent::Markdown_Parser(); } # Extra variables used during extra transformations. - protected $footnotes = array(); - protected $footnotes_ordered = array(); - protected $footnotes_ref_count = array(); - protected $footnotes_numbers = array(); - protected $abbr_desciptions = array(); - protected $abbr_word_re = ''; + var $footnotes = array(); + var $footnotes_ordered = array(); + var $abbr_desciptions = array(); + var $abbr_word_re = ''; # Give the current footnote number. - protected $footnote_counter = 1; + var $footnote_counter = 1; - protected function setup() { + function setup() { # # Setting up Extra-specific variables. # @@ -1606,8 +1739,6 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { $this->footnotes = array(); $this->footnotes_ordered = array(); - $this->footnotes_ref_count = array(); - $this->footnotes_numbers = array(); $this->abbr_desciptions = array(); $this->abbr_word_re = ''; $this->footnote_counter = 1; @@ -1620,14 +1751,12 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } } - protected function teardown() { + function teardown() { # # Clearing Extra-specific variables. # $this->footnotes = array(); $this->footnotes_ordered = array(); - $this->footnotes_ref_count = array(); - $this->footnotes_numbers = array(); $this->abbr_desciptions = array(); $this->abbr_word_re = ''; @@ -1635,114 +1764,26 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } - ### Extra Attribute Parser ### - - # Expression to use to catch attributes (includes the braces) - protected $id_class_attr_catch_re = '\{((?:[ ]*[#.][-_:a-zA-Z0-9]+){1,})[ ]*\}'; - # Expression to use when parsing in a context when no capture is desired - protected $id_class_attr_nocatch_re = '\{(?:[ ]*[#.][-_:a-zA-Z0-9]+){1,}[ ]*\}'; - - protected function doExtraAttributes($tag_name, $attr) { - # - # Parse attributes caught by the $this->id_class_attr_catch_re expression - # and return the HTML-formatted list of attributes. - # - # Currently supported attributes are .class and #id. - # - if (empty($attr)) return ""; - - # Split on components - preg_match_all('/[#.][-_:a-zA-Z0-9]+/', $attr, $matches); - $elements = $matches[0]; - - # handle classes and ids (only first id taken into account) - $classes = array(); - $id = false; - foreach ($elements as $element) { - if ($element{0} == '.') { - $classes[] = substr($element, 1); - } else if ($element{0} == '#') { - if ($id === false) $id = substr($element, 1); - } - } - - # compose attributes as string - $attr_str = ""; - if (!empty($id)) { - $attr_str .= ' id="'.$id.'"'; - } - if (!empty($classes)) { - $attr_str .= ' class="'.implode(" ", $classes).'"'; - } - return $attr_str; - } - - - protected function stripLinkDefinitions($text) { - # - # Strips link definitions from text, stores the URLs and titles in - # hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: ^[id]: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\[(.+)\][ ]?: # id = $1 - [ ]* - \n? # maybe *one* newline - [ ]* - (?: - <(.+?)> # url = $2 - | - (\S+?) # url = $3 - ) - [ ]* - \n? # maybe one newline - [ ]* - (?: - (?<=\s) # lookbehind for whitespace - ["(] - (.*?) # title = $4 - [")] - [ ]* - )? # title is optional - (?:[ ]* '.$this->id_class_attr_catch_re.' )? # $5 = extra id & class attr - (?:\n+|\Z) - }xm', - array(&$this, '_stripLinkDefinitions_callback'), - $text); - return $text; - } - protected function _stripLinkDefinitions_callback($matches) { - $link_id = strtolower($matches[1]); - $url = $matches[2] == '' ? $matches[3] : $matches[2]; - $this->urls[$link_id] = $url; - $this->titles[$link_id] =& $matches[4]; - $this->ref_attr[$link_id] = $this->doExtraAttributes("", $dummy =& $matches[5]); - return ''; # String that will replace the block - } - - ### HTML Block Parser ### # Tags that are always treated as block tags: - protected $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption'; - - # Tags treated as block tags only if the opening tag is alone on its line: - protected $context_block_tags_re = 'script|noscript|ins|del|iframe|object|source|track|param|math|svg|canvas|audio|video'; + var $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend'; + + # Tags treated as block tags only if the opening tag is alone on it's line: + var $context_block_tags_re = 'script|noscript|math|ins|del'; # Tags where markdown="1" default to span mode: - protected $contain_span_tags_re = 'p|h[1-6]|li|dd|dt|td|th|legend|address'; + var $contain_span_tags_re = 'p|h[1-6]|li|dd|dt|td|th|legend|address'; # Tags which must not have their contents modified, no matter where # they appear: - protected $clean_tags_re = 'script|math|svg'; + var $clean_tags_re = 'script|math'; # Tags that do not need to be closed. - protected $auto_close_tags_re = 'hr|img|param|source|track'; + var $auto_close_tags_re = 'hr|img'; - protected function hashHTMLBlocks($text) { + function hashHTMLBlocks($text) { # # Hashify HTML Blocks and "clean tags". # @@ -1754,12 +1795,10 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { # # This works by calling _HashHTMLBlocks_InMarkdown, which then calls # _HashHTMLBlocks_InHTML when it encounter block tags. When the markdown="1" - # attribute is found within a tag, _HashHTMLBlocks_InHTML calls back + # attribute is found whitin a tag, _HashHTMLBlocks_InHTML calls back # _HashHTMLBlocks_InMarkdown to handle the Markdown syntax within the tag. # These two functions are calling each other. It's recursive! # - if ($this->no_markup) return $text; - # # Call the HTML-in-Markdown hasher. # @@ -1767,7 +1806,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { return $text; } - protected function _hashHTMLBlocks_inMarkdown($text, $indent = 0, + function _hashHTMLBlocks_inMarkdown($text, $indent = 0, $enclosing_tag_re = '', $span = false) { # @@ -1809,7 +1848,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { # Regex to match any tag. $block_tag_re = '{ - ( # $2: Capture whole tag. + ( # $2: Capture hole tag. # Tag name. '.$this->block_tags_re.' | @@ -1845,16 +1884,8 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { )* | # Fenced code block marker - (?<= ^ | \n ) - [ ]{0,'.($indent+3).'}~{3,} - [ ]* - (?: - \.?[-_:a-zA-Z0-9]+ # standalone class name - | - '.$this->id_class_attr_nocatch_re.' # extra attributes - )? - [ ]* - \n + (?> ^ | \n ) + [ ]{'.($indent).'}~~~+[ ]*\n ' : '' ). ' # End (if not is span). ) }xs'; @@ -1916,13 +1947,20 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } } # + # Check for: Indented code block. + # + else if ($tag{0} == "\n" || $tag{0} == " ") { + # Indented code block: pass it unchanged, will be handled + # later. + $parsed .= $tag; + } + # # Check for: Fenced code block marker. # - else if (preg_match('{^\n?([ ]{0,'.($indent+3).'})(~+)}', $tag, $capture)) { + else if ($tag{0} == "~") { # Fenced code block marker: find matching end marker. - $fence_indent = strlen($capture[1]); # use captured indent in re - $fence_re = $capture[2]; # use captured fence in re - if (preg_match('{^(?>.*\n)*?[ ]{'.($fence_indent).'}'.$fence_re.'[ ]*(?:\n|$)}', $text, + $tag_re = preg_quote(trim($tag)); + if (preg_match('{^(?>.*\n)+?'.$tag_re.' *\n}', $text, $matches)) { # End marker found: pass text unchanged until marker. @@ -1935,14 +1973,6 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } } # - # Check for: Indented code block. - # - else if ($tag{0} == "\n" || $tag{0} == " ") { - # Indented code block: pass it unchanged, will be handled - # later. - $parsed .= $tag; - } - # # Check for: Opening Block level tag or # Opening Context Block tag (like ins and del) # used as a block tag (tag is alone on it's line). @@ -2005,7 +2035,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { return array($parsed, $text); } - protected function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { + function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { # # Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags. # @@ -2036,7 +2066,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { # Regex to match any tag. $tag_re = '{ - ( # $2: Capture whole tag. + ( # $2: Capture hole tag. hashPart($text, 'C'); } - protected function doAnchors($text) { + function doHeaders($text) { # - # Turn Markdown link shortcuts into XHTML tags. - # - if ($this->in_anchor) return $text; - $this->in_anchor = true; - - # - # First, handle reference-style links: [link text] [id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - ) - }xs', - array(&$this, '_doAnchors_reference_callback'), $text); - - # - # Next, inline-style links: [link text](url "optional title") - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - \( # literal paren - [ \n]* - (?: - <(.+?)> # href = $3 - | - ('.$this->nested_url_parenthesis_re.') # href = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # Title = $7 - \6 # matching quote - [ \n]* # ignore any spaces/tabs between closing quote and ) - )? # title is optional - \) - (?:[ ]? '.$this->id_class_attr_catch_re.' )? # $8 = id/class attributes - ) - }xs', - array(&$this, '_doAnchors_inline_callback'), $text); - - # - # Last, handle reference-style shortcuts: [link text] - # These must come last in case you've also got [link text][1] - # or [link text](/foo) - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ([^\[\]]+) # link text = $2; can\'t contain [ or ] - \] - ) - }xs', - array(&$this, '_doAnchors_reference_callback'), $text); - - $this->in_anchor = false; - return $text; - } - protected function _doAnchors_reference_callback($matches) { - $whole_match = $matches[1]; - $link_text = $matches[2]; - $link_id =& $matches[3]; - - if ($link_id == "") { - # for shortcut links like [this][] or [this]. - $link_id = $link_text; - } - - # lower-case and turn embedded newlines into spaces - $link_id = strtolower($link_id); - $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); - - if (isset($this->urls[$link_id])) { - $url = $this->urls[$link_id]; - $url = $this->encodeAttribute($url); - - $result = "titles[$link_id] ) ) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - if (isset($this->ref_attr[$link_id])) - $result .= $this->ref_attr[$link_id]; - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - $result = $this->hashPart($result); - } - else { - $result = $whole_match; - } - return $result; - } - protected function _doAnchors_inline_callback($matches) { - $whole_match = $matches[1]; - $link_text = $this->runSpanGamut($matches[2]); - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - $attr = $this->doExtraAttributes("a", $dummy =& $matches[8]); - - - $url = $this->encodeAttribute($url); - - $result = "encodeAttribute($title); - $result .= " title=\"$title\""; - } - $result .= $attr; - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - - return $this->hashPart($result); - } - - - protected function doImages($text) { - # - # Turn Markdown image shortcuts into tags. - # - # - # First, handle reference-style labeled images: ![alt text][id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - - ) - }xs', - array(&$this, '_doImages_reference_callback'), $text); - - # - # Next, handle inline images: ![alt text](url "optional title") - # Don't forget: encode * and _ - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - \s? # One optional whitespace character - \( # literal paren - [ \n]* - (?: - <(\S*)> # src url = $3 - | - ('.$this->nested_url_parenthesis_re.') # src url = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # title = $7 - \6 # matching quote - [ \n]* - )? # title is optional - \) - (?:[ ]? '.$this->id_class_attr_catch_re.' )? # $8 = id/class attributes - ) - }xs', - array(&$this, '_doImages_inline_callback'), $text); - - return $text; - } - protected function _doImages_reference_callback($matches) { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $link_id = strtolower($matches[3]); - - if ($link_id == "") { - $link_id = strtolower($alt_text); # for shortcut links like ![this][]. - } - - $alt_text = $this->encodeAttribute($alt_text); - if (isset($this->urls[$link_id])) { - $url = $this->encodeAttribute($this->urls[$link_id]); - $result = "\"$alt_text\"";titles[$link_id])) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - if (isset($this->ref_attr[$link_id])) - $result .= $this->ref_attr[$link_id]; - $result .= $this->empty_element_suffix; - $result = $this->hashPart($result); - } - else { - # If there's no such link ID, leave intact: - $result = $whole_match; - } - - return $result; - } - protected function _doImages_inline_callback($matches) { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - $attr = $this->doExtraAttributes("img", $dummy =& $matches[8]); - - $alt_text = $this->encodeAttribute($alt_text); - $url = $this->encodeAttribute($url); - $result = "\"$alt_text\"";encodeAttribute($title); - $result .= " title=\"$title\""; # $title already quoted - } - $result .= $attr; - $result .= $this->empty_element_suffix; - - return $this->hashPart($result); - } - - - protected function doHeaders($text) { - # - # Redefined to add id and class attribute support. + # Redefined to add id attribute support. # # Setext-style headers: # Header 1 {#header1} # ======== # - # Header 2 {#header2 .class1 .class2} + # Header 2 {#header2} # -------- # $text = preg_replace_callback( '{ (^.+?) # $1: Header text - (?:[ ]+ '.$this->id_class_attr_catch_re.' )? # $3 = id/class attributes + (?:[ ]+\{\#([-_:a-zA-Z0-9]+)\})? # $2: Id attribute [ ]*\n(=+|-+)[ ]*\n+ # $3: Header footer }mx', array(&$this, '_doHeaders_callback_setext'), $text); @@ -2450,9 +2242,9 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { # atx-style headers: # # Header 1 {#header1} # ## Header 2 {#header2} - # ## Header 2 with closing hashes ## {#header3.class1.class2} + # ## Header 2 with closing hashes ## {#header3} # ... - # ###### Header 6 {.class2} + # ###### Header 6 {#header2} # $text = preg_replace_callback('{ ^(\#{1,6}) # $1 = string of #\'s @@ -2460,7 +2252,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { (.+?) # $2 = Header text [ ]* \#* # optional closing #\'s (not counted) - (?:[ ]+ '.$this->id_class_attr_catch_re.' )? # $3 = id/class attributes + (?:[ ]+\{\#([-_:a-zA-Z0-9]+)\})? # id attribute [ ]* \n+ }xm', @@ -2468,23 +2260,27 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { return $text; } - protected function _doHeaders_callback_setext($matches) { + function _doHeaders_attr($attr) { + if (empty($attr)) return ""; + return " id=\"$attr\""; + } + function _doHeaders_callback_setext($matches) { if ($matches[3] == '-' && preg_match('{^- }', $matches[1])) return $matches[0]; $level = $matches[3]{0} == '=' ? 1 : 2; - $attr = $this->doExtraAttributes("h$level", $dummy =& $matches[2]); + $attr = $this->_doHeaders_attr($id =& $matches[2]); $block = "".$this->runSpanGamut($matches[1]).""; return "\n" . $this->hashBlock($block) . "\n\n"; } - protected function _doHeaders_callback_atx($matches) { + function _doHeaders_callback_atx($matches) { $level = strlen($matches[1]); - $attr = $this->doExtraAttributes("h$level", $dummy =& $matches[3]); + $attr = $this->_doHeaders_attr($id =& $matches[3]); $block = "".$this->runSpanGamut($matches[2]).""; return "\n" . $this->hashBlock($block) . "\n\n"; } - protected function doTables($text) { + function doTables($text) { # # Form HTML tables. # @@ -2545,7 +2341,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { return $text; } - protected function _doTable_leadingPipe_callback($matches) { + function _doTable_leadingPipe_callback($matches) { $head = $matches[1]; $underline = $matches[2]; $content = $matches[3]; @@ -2555,15 +2351,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { return $this->_doTable_callback(array($matches[0], $head, $underline, $content)); } - protected function _doTable_makeAlignAttr($alignname) - { - if (empty($this->table_align_class_tmpl)) - return " align=\"$alignname\""; - - $classname = str_replace('%%', $alignname, $this->table_align_class_tmpl); - return " class=\"$classname\""; - } - protected function _doTable_callback($matches) { + function _doTable_callback($matches) { $head = $matches[1]; $underline = $matches[2]; $content = $matches[3]; @@ -2576,14 +2364,10 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { # Reading alignement from header underline. $separators = preg_split('/ *[|] */', $underline); foreach ($separators as $n => $s) { - if (preg_match('/^ *-+: *$/', $s)) - $attr[$n] = $this->_doTable_makeAlignAttr('right'); - else if (preg_match('/^ *:-+: *$/', $s)) - $attr[$n] = $this->_doTable_makeAlignAttr('center'); - else if (preg_match('/^ *:-+ *$/', $s)) - $attr[$n] = $this->_doTable_makeAlignAttr('left'); - else - $attr[$n] = ''; + if (preg_match('/^ *-+: *$/', $s)) $attr[$n] = ' align="right"'; + else if (preg_match('/^ *:-+: *$/', $s))$attr[$n] = ' align="center"'; + else if (preg_match('/^ *:-+ *$/', $s)) $attr[$n] = ' align="left"'; + else $attr[$n] = ''; } # Parsing span elements, including code spans, character escapes, @@ -2591,7 +2375,6 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { $head = $this->parseSpan($head); $headers = preg_split('/ *[|] */', $head); $col_count = count($headers); - $attr = array_pad($attr, $col_count, ''); # Write column headers. $text = "\n"; @@ -2627,7 +2410,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } - protected function doDefLists($text) { + function doDefLists($text) { # # Form HTML definition lists. # @@ -2669,7 +2452,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { return $text; } - protected function _doDefLists_callback($matches) { + function _doDefLists_callback($matches) { # Re-usable patterns to match list item bullets and number markers: $list = $matches[1]; @@ -2681,7 +2464,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } - protected function processDefListItems($list_str) { + function processDefListItems($list_str) { # # Process the contents of a single definition list, splitting it # into individual term and definition list items. @@ -2696,7 +2479,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { (?>\A\n?|\n\n+) # leading line ( # definition terms = $1 [ ]{0,'.$less_than_tab.'} # leading whitespace - (?!\:[ ]|[ ]) # negative lookahead for a definition + (?![:][ ]|[ ]) # negative lookahead for a definition # mark (colon) or more whitespace. (?> \S.* \n)+? # actual term (not whitespace). ) @@ -2710,12 +2493,12 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { \n(\n+)? # leading line = $1 ( # marker space = $2 [ ]{0,'.$less_than_tab.'} # whitespace before colon - \:[ ]+ # definition mark (colon) + [:][ ]+ # definition mark (colon) ) ((?s:.+?)) # definition text = $3 (?= \n+ # stop at next definition mark, (?: # next term or end of text - [ ]{0,'.$less_than_tab.'} \:[ ] | + [ ]{0,'.$less_than_tab.'} [:][ ] |
    | \z ) ) @@ -2724,7 +2507,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { return $list_str; } - protected function _processDefListItems_callback_dt($matches) { + function _processDefListItems_callback_dt($matches) { $terms = explode("\n", trim($matches[1])); $text = ''; foreach ($terms as $term) { @@ -2733,7 +2516,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } return $text . "\n"; } - protected function _processDefListItems_callback_dd($matches) { + function _processDefListItems_callback_dd($matches) { $leading_line = $matches[1]; $marker_space = $matches[2]; $def = $matches[3]; @@ -2753,7 +2536,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } - protected function doFencedCodeBlocks($text) { + function doFencedCodeBlocks($text) { # # Adding the fenced code block syntax to regular Markdown: # @@ -2769,15 +2552,9 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { ( ~{3,} # Marker: three tilde or more. ) - [ ]* - (?: - \.?([-_:a-zA-Z0-9]+) # 2: standalone class name - | - '.$this->id_class_attr_catch_re.' # 3: Extra attributes - )? [ ]* \n # Whitespace and newline following marker. - # 4: Content + # 2: Content ( (?> (?!\1 [ ]* \n) # Not a closing marker. @@ -2792,28 +2569,15 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { return $text; } - protected function _doFencedCodeBlocks_callback($matches) { - $classname =& $matches[2]; - $attrs =& $matches[3]; - $codeblock = $matches[4]; + function _doFencedCodeBlocks_callback($matches) { + $codeblock = $matches[2]; $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES); $codeblock = preg_replace_callback('/^\n+/', array(&$this, '_doFencedCodeBlocks_newlines'), $codeblock); - - if ($classname != "") { - if ($classname{0} == '.') - $classname = substr($classname, 1); - $attr_str = ' class="'.$this->code_class_prefix.$classname.'"'; - } else { - $attr_str = $this->doExtraAttributes($this->code_attr_on_pre ? "pre" : "code", $attrs); - } - $pre_attr_str = $this->code_attr_on_pre ? $attr_str : ''; - $code_attr_str = $this->code_attr_on_pre ? '' : $attr_str; - $codeblock = "$codeblock"; - + $codeblock = "
    $codeblock
    "; return "\n\n".$this->hashBlock($codeblock)."\n\n"; } - protected function _doFencedCodeBlocks_newlines($matches) { + function _doFencedCodeBlocks_newlines($matches) { return str_repeat("empty_element_suffix", strlen($matches[0])); } @@ -2823,24 +2587,24 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { # Redefining emphasis markers so that emphasis by underscore does not # work in the middle of a word. # - protected $em_relist = array( - '' => '(?:(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? tags @@ -2878,7 +2642,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { ### Footnotes - protected function stripFootnotes($text) { + function stripFootnotes($text) { # # Strips link definitions from text, stores the URLs and titles in # hash references. @@ -2905,14 +2669,14 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { $text); return $text; } - protected function _stripFootnotes_callback($matches) { + function _stripFootnotes_callback($matches) { $note_id = $this->fn_id_prefix . $matches[1]; $this->footnotes[$note_id] = $this->outdent($matches[2]); return ''; # String that will replace the block } - protected function doFootnotes($text) { + function doFootnotes($text) { # # Replace footnote references in $text [^id] with a special text-token # which will be replaced by the actual footnote marker in appendFootnotes. @@ -2924,7 +2688,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } - protected function appendFootnotes($text) { + function appendFootnotes($text) { # # Append footnote list to text. # @@ -2954,9 +2718,6 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { $footnote = reset($this->footnotes_ordered); $note_id = key($this->footnotes_ordered); unset($this->footnotes_ordered[$note_id]); - $ref_count = $this->footnotes_ref_count[$note_id]; - unset($this->footnotes_ref_count[$note_id]); - unset($this->footnotes[$note_id]); $footnote .= "\n"; # Need to append newline before parsing. $footnote = $this->runBlockGamut("$footnote\n"); @@ -2965,13 +2726,9 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { $attr = str_replace("%%", ++$num, $attr); $note_id = $this->encodeAttribute($note_id); - - # Prepare backlink, multiple backlinks if multiple references - $backlink = ""; - for ($ref_num = 2; $ref_num <= $ref_count; ++$ref_num) { - $backlink .= " "; - } + # Add backlink to last paragraph; create new paragraph if needed. + $backlink = ""; if (preg_match('{

    $}', $footnote)) { $footnote = substr($footnote, 0, -4) . " $backlink

    "; } else { @@ -2988,25 +2745,18 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } return $text; } - protected function _appendFootnotes_callback($matches) { + function _appendFootnotes_callback($matches) { $node_id = $this->fn_id_prefix . $matches[1]; # Create footnote marker only if it has a corresponding footnote *and* # the footnote hasn't been used by another marker. if (isset($this->footnotes[$node_id])) { - $num =& $this->footnotes_numbers[$node_id]; - if (!isset($num)) { - # Transfer footnote content to the ordered list and give it its - # number - $this->footnotes_ordered[$node_id] = $this->footnotes[$node_id]; - $this->footnotes_ref_count[$node_id] = 1; - $num = $this->footnote_counter++; - $ref_count_mark = ''; - } else { - $ref_count_mark = $this->footnotes_ref_count[$node_id] += 1; - } - - $attr = ""; + # Transfert footnote content to the ordered list. + $this->footnotes_ordered[$node_id] = $this->footnotes[$node_id]; + unset($this->footnotes[$node_id]); + + $num = $this->footnote_counter++; + $attr = " rel=\"footnote\""; if ($this->fn_link_class != "") { $class = $this->fn_link_class; $class = $this->encodeAttribute($class); @@ -3022,7 +2772,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { $node_id = $this->encodeAttribute($node_id); return - "". + "". "$num". ""; } @@ -3033,7 +2783,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { ### Abbreviations ### - protected function stripAbbreviations($text) { + function stripAbbreviations($text) { # # Strips abbreviations from text, stores titles in hash references. # @@ -3048,7 +2798,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { $text); return $text; } - protected function _stripAbbreviations_callback($matches) { + function _stripAbbreviations_callback($matches) { $abbr_word = $matches[1]; $abbr_desc = $matches[2]; if ($this->abbr_word_re) @@ -3059,7 +2809,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } - protected function doAbbreviations($text) { + function doAbbreviations($text) { # # Find defined abbreviations in text and wrap them in elements. # @@ -3075,7 +2825,7 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } return $text; } - protected function _doAbbreviations_callback($matches) { + function _doAbbreviations_callback($matches) { $abbr = $matches[0]; if (isset($this->abbr_desciptions[$abbr])) { $desc = $this->abbr_desciptions[$abbr]; @@ -3093,4 +2843,90 @@ class _MarkdownExtra_TmpImpl extends \Michelf\Markdown { } +/* + +PHP Markdown Extra +================== + +Description +----------- + +This is a PHP port of the original Markdown formatter written in Perl +by John Gruber. This special "Extra" version of PHP Markdown features +further enhancements to the syntax for making additional constructs +such as tables and definition list. + +Markdown is a text-to-HTML filter; it translates an easy-to-read / +easy-to-write structured text format into HTML. Markdown's text format +is most similar to that of plain text email, and supports features such +as headers, *emphasis*, code blocks, blockquotes, and links. + +Markdown's syntax is designed not as a generic markup language, but +specifically to serve as a front-end to (X)HTML. You can use span-level +HTML tags anywhere in a Markdown document, and you can use block level +HTML tags (like
    and
    as well). + +For more information about Markdown's syntax, see: + + + + +Bugs +---- + +To file bug reports please send email to: + + + +Please include with your report: (1) the example input; (2) the output you +expected; (3) the output Markdown actually produced. + + +Version History +--------------- + +See the readme file for detailed release notes for this version. + + +Copyright and License +--------------------- + +PHP Markdown & Extra +Copyright (c) 2004-2009 Michel Fortin + +All rights reserved. + +Based on Markdown +Copyright (c) 2003-2006 John Gruber + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name "Markdown" nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as +is" and any express or implied warranties, including, but not limited +to, the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the copyright owner +or contributors be liable for any direct, indirect, incidental, special, +exemplary, or consequential damages (including, but not limited to, +procurement of substitute goods or services; loss of use, data, or +profits; or business interruption) however caused and on any theory of +liability, whether in contract, strict liability, or tort (including +negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. + +*/ ?> \ No newline at end of file diff --git a/lib/markdown/markdown_extended.php b/lib/markdown/markdown_extended.php new file mode 100644 index 0000000..6e13bbe --- /dev/null +++ b/lib/markdown/markdown_extended.php @@ -0,0 +1,162 @@ +transform($text); +} + +class MarkdownExtraExtended_Parser extends MarkdownExtra_Parser { + # Tags that are always treated as block tags: + var $block_tags_re = 'figure|figcaption|p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend'; + var $default_classes; + + function MarkdownExtraExtended_Parser($default_classes = array()) { + $default_classes = $default_classes; + + $this->block_gamut += array( + "doFencedFigures" => 7, + ); + + parent::MarkdownExtra_Parser(); + } + + function transform($text) { + $text = parent::transform($text); + return $text; + } + + function doHardBreaks($text) { + # Do hard breaks: + # EXTENDED: changed to allow breaks without two spaces and just one new line + # to activate this, uncomment the following code: + # return preg_replace_callback('/ *\n/', + return preg_replace_callback('/ {2,}\n/', + array(&$this, '_doHardBreaks_callback'), $text); + } + + + function doBlockQuotes($text) { + $text = preg_replace_callback('/ + (?>^[ ]*>[ ]? + (?:\((.+?)\))? + [ ]*(.+\n(?:.+\n)*) + )+ + /xm', + array(&$this, '_doBlockQuotes_callback'), $text); + + return $text; + } + + function _doBlockQuotes_callback($matches) { + $cite = $matches[1]; + $bq = '> ' . $matches[2]; + # trim one level of quoting - trim whitespace-only lines + $bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq); + $bq = $this->runBlockGamut($bq); # recurse + + $bq = preg_replace('/^/m', " ", $bq); + # These leading spaces cause problem with
     content, 
    +		# so we need to fix that:
    +		$bq = preg_replace_callback('{(\s*
    .+?
    )}sx', + array(&$this, '_doBlockQuotes_callback2'), $bq); + + $res = "" : " cite=\"$cite\">"; + $res .= "\n$bq\n"; + return "\n". $this->hashBlock($res)."\n\n"; + } + + function doFencedCodeBlocks($text) { + $less_than_tab = $this->tab_width; + + $text = preg_replace_callback('{ + (?:\n|\A) + # 1: Opening marker + ( + ~{3,}|`{3,} # Marker: three tilde or more. + ) + + [ ]?(\w+)?(?:,[ ]?(\d+))?[ ]* \n # Whitespace and newline following marker. + + # 3: Content + ( + (?> + (?!\1 [ ]* \n) # Not a closing marker. + .*\n+ + )+ + ) + + # Closing marker. + \1 [ ]* \n + }xm', + array(&$this, '_doFencedCodeBlocks_callback'), $text); + + return $text; + } + + function _doFencedCodeBlocks_callback($matches) { + $codeblock = $matches[4]; + $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES); + $codeblock = preg_replace_callback('/^\n+/', + array(&$this, '_doFencedCodeBlocks_newlines'), $codeblock); + //$codeblock = "
    $codeblock
    "; + //$cb = "
    " : " class=\"language-$matches[2]\">";
    +		$cb .= "$codeblock
    "; + return "\n\n".$this->hashBlock($cb)."\n\n"; + } + + function doFencedFigures($text){ + $text = preg_replace_callback('{ + (?:\n|\A) + # 1: Opening marker + ( + ={3,} # Marker: equal sign. + ) + + [ ]?(?:\[([^\]]+)\])?[ ]* \n # Whitespace and newline following marker. + + # 3: Content + ( + (?> + (?!\1 [ ]?(?:\[([^\]]+)\])?[ ]* \n) # Not a closing marker. + .*\n+ + )+ + ) + + # Closing marker. + \1 [ ]?(?:\[([^\]]+)\])?[ ]* \n + }xm', array(&$this, '_doFencedFigures_callback'), $text); + + return $text; + } + + function _doFencedFigures_callback($matches) { + # get figcaption + $topcaption = empty($matches[2]) ? null : $this->runBlockGamut($matches[2]); + $bottomcaption = empty($matches[5]) ? null : $this->runBlockGamut($matches[5]); + $figure = $matches[3]; + $figure = $this->runBlockGamut($figure); # recurse + + $figure = preg_replace('/^/m', " ", $figure); + # These leading spaces cause problem with
     content, 
    +		# so we need to fix that - reuse blockqoute code to handle this:
    +		$figure = preg_replace_callback('{(\s*
    .+?
    )}sx', + array(&$this, '_doBlockQuotes_callback2'), $figure); + + $res = "
    "; + if(!empty($topcaption)){ + $res .= "\n
    $topcaption
    "; + } + $res .= "\n$figure\n"; + if(!empty($bottomcaption) && empty($topcaption)){ + $res .= "
    $bottomcaption
    "; + } + $res .= "
    "; + return "\n". $this->hashBlock($res)."\n\n"; + } +} +?> diff --git a/lib/pico.php b/lib/pico.php index 7861d46..cd476a0 100644 --- a/lib/pico.php +++ b/lib/pico.php @@ -1,5 +1,5 @@ base_url(), $content); - $content = MarkdownExtra::defaultTransform($content); + $content = MarkdownExtended($content); return $content; } @@ -246,7 +246,7 @@ class Pico { 'date' => isset($page_meta['date']) ? $page_meta['date'] : '', 'date_formatted' => isset($page_meta['date']) ? date($config['date_format'], strtotime($page_meta['date'])) : '', 'content' => $page_content, - 'excerpt' => $this->limit_words(strip_tags($page_content), $excerpt_length) + 'excerpt' => $this->limit_words($page_content, $excerpt_length) ); // Extend the data provided with each page by hooking into the data array diff --git a/vendor/twig/twig/.editorconfig b/lib/twig/twig/.editorconfig similarity index 100% rename from vendor/twig/twig/.editorconfig rename to lib/twig/twig/.editorconfig diff --git a/vendor/twig/twig/.gitignore b/lib/twig/twig/.gitignore similarity index 100% rename from vendor/twig/twig/.gitignore rename to lib/twig/twig/.gitignore diff --git a/vendor/twig/twig/.travis.yml b/lib/twig/twig/.travis.yml similarity index 100% rename from vendor/twig/twig/.travis.yml rename to lib/twig/twig/.travis.yml diff --git a/vendor/twig/twig/AUTHORS b/lib/twig/twig/AUTHORS similarity index 100% rename from vendor/twig/twig/AUTHORS rename to lib/twig/twig/AUTHORS diff --git a/vendor/twig/twig/CHANGELOG b/lib/twig/twig/CHANGELOG similarity index 100% rename from vendor/twig/twig/CHANGELOG rename to lib/twig/twig/CHANGELOG diff --git a/vendor/twig/twig/LICENSE b/lib/twig/twig/LICENSE similarity index 100% rename from vendor/twig/twig/LICENSE rename to lib/twig/twig/LICENSE diff --git a/vendor/twig/twig/README.markdown b/lib/twig/twig/README.markdown similarity index 100% rename from vendor/twig/twig/README.markdown rename to lib/twig/twig/README.markdown diff --git a/vendor/twig/twig/composer.json b/lib/twig/twig/composer.json similarity index 100% rename from vendor/twig/twig/composer.json rename to lib/twig/twig/composer.json diff --git a/vendor/twig/twig/lib/Twig/Autoloader.php b/lib/twig/twig/lib/Twig/Autoloader.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Autoloader.php rename to lib/twig/twig/lib/Twig/Autoloader.php diff --git a/vendor/twig/twig/lib/Twig/Compiler.php b/lib/twig/twig/lib/Twig/Compiler.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Compiler.php rename to lib/twig/twig/lib/Twig/Compiler.php diff --git a/vendor/twig/twig/lib/Twig/CompilerInterface.php b/lib/twig/twig/lib/Twig/CompilerInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/CompilerInterface.php rename to lib/twig/twig/lib/Twig/CompilerInterface.php diff --git a/vendor/twig/twig/lib/Twig/Environment.php b/lib/twig/twig/lib/Twig/Environment.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Environment.php rename to lib/twig/twig/lib/Twig/Environment.php diff --git a/vendor/twig/twig/lib/Twig/Error.php b/lib/twig/twig/lib/Twig/Error.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Error.php rename to lib/twig/twig/lib/Twig/Error.php diff --git a/vendor/twig/twig/lib/Twig/Error/Loader.php b/lib/twig/twig/lib/Twig/Error/Loader.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Error/Loader.php rename to lib/twig/twig/lib/Twig/Error/Loader.php diff --git a/vendor/twig/twig/lib/Twig/Error/Runtime.php b/lib/twig/twig/lib/Twig/Error/Runtime.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Error/Runtime.php rename to lib/twig/twig/lib/Twig/Error/Runtime.php diff --git a/vendor/twig/twig/lib/Twig/Error/Syntax.php b/lib/twig/twig/lib/Twig/Error/Syntax.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Error/Syntax.php rename to lib/twig/twig/lib/Twig/Error/Syntax.php diff --git a/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php b/lib/twig/twig/lib/Twig/ExistsLoaderInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php rename to lib/twig/twig/lib/Twig/ExistsLoaderInterface.php diff --git a/vendor/twig/twig/lib/Twig/ExpressionParser.php b/lib/twig/twig/lib/Twig/ExpressionParser.php similarity index 100% rename from vendor/twig/twig/lib/Twig/ExpressionParser.php rename to lib/twig/twig/lib/Twig/ExpressionParser.php diff --git a/vendor/twig/twig/lib/Twig/Extension.php b/lib/twig/twig/lib/Twig/Extension.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Extension.php rename to lib/twig/twig/lib/Twig/Extension.php diff --git a/vendor/twig/twig/lib/Twig/Extension/Core.php b/lib/twig/twig/lib/Twig/Extension/Core.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Extension/Core.php rename to lib/twig/twig/lib/Twig/Extension/Core.php diff --git a/vendor/twig/twig/lib/Twig/Extension/Debug.php b/lib/twig/twig/lib/Twig/Extension/Debug.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Extension/Debug.php rename to lib/twig/twig/lib/Twig/Extension/Debug.php diff --git a/vendor/twig/twig/lib/Twig/Extension/Escaper.php b/lib/twig/twig/lib/Twig/Extension/Escaper.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Extension/Escaper.php rename to lib/twig/twig/lib/Twig/Extension/Escaper.php diff --git a/vendor/twig/twig/lib/Twig/Extension/Optimizer.php b/lib/twig/twig/lib/Twig/Extension/Optimizer.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Extension/Optimizer.php rename to lib/twig/twig/lib/Twig/Extension/Optimizer.php diff --git a/vendor/twig/twig/lib/Twig/Extension/Sandbox.php b/lib/twig/twig/lib/Twig/Extension/Sandbox.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Extension/Sandbox.php rename to lib/twig/twig/lib/Twig/Extension/Sandbox.php diff --git a/vendor/twig/twig/lib/Twig/Extension/Staging.php b/lib/twig/twig/lib/Twig/Extension/Staging.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Extension/Staging.php rename to lib/twig/twig/lib/Twig/Extension/Staging.php diff --git a/vendor/twig/twig/lib/Twig/Extension/StringLoader.php b/lib/twig/twig/lib/Twig/Extension/StringLoader.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Extension/StringLoader.php rename to lib/twig/twig/lib/Twig/Extension/StringLoader.php diff --git a/vendor/twig/twig/lib/Twig/ExtensionInterface.php b/lib/twig/twig/lib/Twig/ExtensionInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/ExtensionInterface.php rename to lib/twig/twig/lib/Twig/ExtensionInterface.php diff --git a/vendor/twig/twig/lib/Twig/Filter.php b/lib/twig/twig/lib/Twig/Filter.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Filter.php rename to lib/twig/twig/lib/Twig/Filter.php diff --git a/vendor/twig/twig/lib/Twig/Filter/Function.php b/lib/twig/twig/lib/Twig/Filter/Function.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Filter/Function.php rename to lib/twig/twig/lib/Twig/Filter/Function.php diff --git a/vendor/twig/twig/lib/Twig/Filter/Method.php b/lib/twig/twig/lib/Twig/Filter/Method.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Filter/Method.php rename to lib/twig/twig/lib/Twig/Filter/Method.php diff --git a/vendor/twig/twig/lib/Twig/Filter/Node.php b/lib/twig/twig/lib/Twig/Filter/Node.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Filter/Node.php rename to lib/twig/twig/lib/Twig/Filter/Node.php diff --git a/vendor/twig/twig/lib/Twig/FilterCallableInterface.php b/lib/twig/twig/lib/Twig/FilterCallableInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/FilterCallableInterface.php rename to lib/twig/twig/lib/Twig/FilterCallableInterface.php diff --git a/vendor/twig/twig/lib/Twig/FilterInterface.php b/lib/twig/twig/lib/Twig/FilterInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/FilterInterface.php rename to lib/twig/twig/lib/Twig/FilterInterface.php diff --git a/vendor/twig/twig/lib/Twig/Function.php b/lib/twig/twig/lib/Twig/Function.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Function.php rename to lib/twig/twig/lib/Twig/Function.php diff --git a/vendor/twig/twig/lib/Twig/Function/Function.php b/lib/twig/twig/lib/Twig/Function/Function.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Function/Function.php rename to lib/twig/twig/lib/Twig/Function/Function.php diff --git a/vendor/twig/twig/lib/Twig/Function/Method.php b/lib/twig/twig/lib/Twig/Function/Method.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Function/Method.php rename to lib/twig/twig/lib/Twig/Function/Method.php diff --git a/vendor/twig/twig/lib/Twig/Function/Node.php b/lib/twig/twig/lib/Twig/Function/Node.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Function/Node.php rename to lib/twig/twig/lib/Twig/Function/Node.php diff --git a/vendor/twig/twig/lib/Twig/FunctionCallableInterface.php b/lib/twig/twig/lib/Twig/FunctionCallableInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/FunctionCallableInterface.php rename to lib/twig/twig/lib/Twig/FunctionCallableInterface.php diff --git a/vendor/twig/twig/lib/Twig/FunctionInterface.php b/lib/twig/twig/lib/Twig/FunctionInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/FunctionInterface.php rename to lib/twig/twig/lib/Twig/FunctionInterface.php diff --git a/vendor/twig/twig/lib/Twig/Lexer.php b/lib/twig/twig/lib/Twig/Lexer.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Lexer.php rename to lib/twig/twig/lib/Twig/Lexer.php diff --git a/vendor/twig/twig/lib/Twig/LexerInterface.php b/lib/twig/twig/lib/Twig/LexerInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/LexerInterface.php rename to lib/twig/twig/lib/Twig/LexerInterface.php diff --git a/vendor/twig/twig/lib/Twig/Loader/Array.php b/lib/twig/twig/lib/Twig/Loader/Array.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Loader/Array.php rename to lib/twig/twig/lib/Twig/Loader/Array.php diff --git a/vendor/twig/twig/lib/Twig/Loader/Chain.php b/lib/twig/twig/lib/Twig/Loader/Chain.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Loader/Chain.php rename to lib/twig/twig/lib/Twig/Loader/Chain.php diff --git a/vendor/twig/twig/lib/Twig/Loader/Filesystem.php b/lib/twig/twig/lib/Twig/Loader/Filesystem.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Loader/Filesystem.php rename to lib/twig/twig/lib/Twig/Loader/Filesystem.php diff --git a/vendor/twig/twig/lib/Twig/Loader/String.php b/lib/twig/twig/lib/Twig/Loader/String.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Loader/String.php rename to lib/twig/twig/lib/Twig/Loader/String.php diff --git a/vendor/twig/twig/lib/Twig/LoaderInterface.php b/lib/twig/twig/lib/Twig/LoaderInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/LoaderInterface.php rename to lib/twig/twig/lib/Twig/LoaderInterface.php diff --git a/vendor/twig/twig/lib/Twig/Markup.php b/lib/twig/twig/lib/Twig/Markup.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Markup.php rename to lib/twig/twig/lib/Twig/Markup.php diff --git a/vendor/twig/twig/lib/Twig/Node.php b/lib/twig/twig/lib/Twig/Node.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node.php rename to lib/twig/twig/lib/Twig/Node.php diff --git a/vendor/twig/twig/lib/Twig/Node/AutoEscape.php b/lib/twig/twig/lib/Twig/Node/AutoEscape.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/AutoEscape.php rename to lib/twig/twig/lib/Twig/Node/AutoEscape.php diff --git a/vendor/twig/twig/lib/Twig/Node/Block.php b/lib/twig/twig/lib/Twig/Node/Block.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Block.php rename to lib/twig/twig/lib/Twig/Node/Block.php diff --git a/vendor/twig/twig/lib/Twig/Node/BlockReference.php b/lib/twig/twig/lib/Twig/Node/BlockReference.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/BlockReference.php rename to lib/twig/twig/lib/Twig/Node/BlockReference.php diff --git a/vendor/twig/twig/lib/Twig/Node/Body.php b/lib/twig/twig/lib/Twig/Node/Body.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Body.php rename to lib/twig/twig/lib/Twig/Node/Body.php diff --git a/vendor/twig/twig/lib/Twig/Node/Do.php b/lib/twig/twig/lib/Twig/Node/Do.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Do.php rename to lib/twig/twig/lib/Twig/Node/Do.php diff --git a/vendor/twig/twig/lib/Twig/Node/Embed.php b/lib/twig/twig/lib/Twig/Node/Embed.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Embed.php rename to lib/twig/twig/lib/Twig/Node/Embed.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression.php b/lib/twig/twig/lib/Twig/Node/Expression.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression.php rename to lib/twig/twig/lib/Twig/Node/Expression.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Array.php b/lib/twig/twig/lib/Twig/Node/Expression/Array.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Array.php rename to lib/twig/twig/lib/Twig/Node/Expression/Array.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php b/lib/twig/twig/lib/Twig/Node/Expression/AssignName.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php rename to lib/twig/twig/lib/Twig/Node/Expression/AssignName.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Add.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Add.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/And.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/And.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Div.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Div.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/In.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/In.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Less.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Less.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Or.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Or.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Power.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Power.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Range.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Range.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php b/lib/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php rename to lib/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php b/lib/twig/twig/lib/Twig/Node/Expression/BlockReference.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php rename to lib/twig/twig/lib/Twig/Node/Expression/BlockReference.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Call.php b/lib/twig/twig/lib/Twig/Node/Expression/Call.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Call.php rename to lib/twig/twig/lib/Twig/Node/Expression/Call.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php b/lib/twig/twig/lib/Twig/Node/Expression/Conditional.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php rename to lib/twig/twig/lib/Twig/Node/Expression/Conditional.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php b/lib/twig/twig/lib/Twig/Node/Expression/Constant.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Constant.php rename to lib/twig/twig/lib/Twig/Node/Expression/Constant.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php b/lib/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php rename to lib/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php b/lib/twig/twig/lib/Twig/Node/Expression/Filter.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Filter.php rename to lib/twig/twig/lib/Twig/Node/Expression/Filter.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php b/lib/twig/twig/lib/Twig/Node/Expression/Filter/Default.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php rename to lib/twig/twig/lib/Twig/Node/Expression/Filter/Default.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Function.php b/lib/twig/twig/lib/Twig/Node/Expression/Function.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Function.php rename to lib/twig/twig/lib/Twig/Node/Expression/Function.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php b/lib/twig/twig/lib/Twig/Node/Expression/GetAttr.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php rename to lib/twig/twig/lib/Twig/Node/Expression/GetAttr.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php b/lib/twig/twig/lib/Twig/Node/Expression/MethodCall.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php rename to lib/twig/twig/lib/Twig/Node/Expression/MethodCall.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Name.php b/lib/twig/twig/lib/Twig/Node/Expression/Name.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Name.php rename to lib/twig/twig/lib/Twig/Node/Expression/Name.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php b/lib/twig/twig/lib/Twig/Node/Expression/Parent.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Parent.php rename to lib/twig/twig/lib/Twig/Node/Expression/Parent.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php b/lib/twig/twig/lib/Twig/Node/Expression/TempName.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/TempName.php rename to lib/twig/twig/lib/Twig/Node/Expression/TempName.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test.php b/lib/twig/twig/lib/Twig/Node/Expression/Test.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Test.php rename to lib/twig/twig/lib/Twig/Node/Expression/Test.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php b/lib/twig/twig/lib/Twig/Node/Expression/Test/Constant.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php rename to lib/twig/twig/lib/Twig/Node/Expression/Test/Constant.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php b/lib/twig/twig/lib/Twig/Node/Expression/Test/Defined.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php rename to lib/twig/twig/lib/Twig/Node/Expression/Test/Defined.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php b/lib/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php rename to lib/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php b/lib/twig/twig/lib/Twig/Node/Expression/Test/Even.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php rename to lib/twig/twig/lib/Twig/Node/Expression/Test/Even.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php b/lib/twig/twig/lib/Twig/Node/Expression/Test/Null.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php rename to lib/twig/twig/lib/Twig/Node/Expression/Test/Null.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php b/lib/twig/twig/lib/Twig/Node/Expression/Test/Odd.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php rename to lib/twig/twig/lib/Twig/Node/Expression/Test/Odd.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php b/lib/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php rename to lib/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php b/lib/twig/twig/lib/Twig/Node/Expression/Unary.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Unary.php rename to lib/twig/twig/lib/Twig/Node/Expression/Unary.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php b/lib/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php rename to lib/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php b/lib/twig/twig/lib/Twig/Node/Expression/Unary/Not.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php rename to lib/twig/twig/lib/Twig/Node/Expression/Unary/Not.php diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php b/lib/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php rename to lib/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php diff --git a/vendor/twig/twig/lib/Twig/Node/Flush.php b/lib/twig/twig/lib/Twig/Node/Flush.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Flush.php rename to lib/twig/twig/lib/Twig/Node/Flush.php diff --git a/vendor/twig/twig/lib/Twig/Node/For.php b/lib/twig/twig/lib/Twig/Node/For.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/For.php rename to lib/twig/twig/lib/Twig/Node/For.php diff --git a/vendor/twig/twig/lib/Twig/Node/ForLoop.php b/lib/twig/twig/lib/Twig/Node/ForLoop.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/ForLoop.php rename to lib/twig/twig/lib/Twig/Node/ForLoop.php diff --git a/vendor/twig/twig/lib/Twig/Node/If.php b/lib/twig/twig/lib/Twig/Node/If.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/If.php rename to lib/twig/twig/lib/Twig/Node/If.php diff --git a/vendor/twig/twig/lib/Twig/Node/Import.php b/lib/twig/twig/lib/Twig/Node/Import.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Import.php rename to lib/twig/twig/lib/Twig/Node/Import.php diff --git a/vendor/twig/twig/lib/Twig/Node/Include.php b/lib/twig/twig/lib/Twig/Node/Include.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Include.php rename to lib/twig/twig/lib/Twig/Node/Include.php diff --git a/vendor/twig/twig/lib/Twig/Node/Macro.php b/lib/twig/twig/lib/Twig/Node/Macro.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Macro.php rename to lib/twig/twig/lib/Twig/Node/Macro.php diff --git a/vendor/twig/twig/lib/Twig/Node/Module.php b/lib/twig/twig/lib/Twig/Node/Module.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Module.php rename to lib/twig/twig/lib/Twig/Node/Module.php diff --git a/vendor/twig/twig/lib/Twig/Node/Print.php b/lib/twig/twig/lib/Twig/Node/Print.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Print.php rename to lib/twig/twig/lib/Twig/Node/Print.php diff --git a/vendor/twig/twig/lib/Twig/Node/Sandbox.php b/lib/twig/twig/lib/Twig/Node/Sandbox.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Sandbox.php rename to lib/twig/twig/lib/Twig/Node/Sandbox.php diff --git a/vendor/twig/twig/lib/Twig/Node/SandboxedModule.php b/lib/twig/twig/lib/Twig/Node/SandboxedModule.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/SandboxedModule.php rename to lib/twig/twig/lib/Twig/Node/SandboxedModule.php diff --git a/vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php b/lib/twig/twig/lib/Twig/Node/SandboxedPrint.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php rename to lib/twig/twig/lib/Twig/Node/SandboxedPrint.php diff --git a/vendor/twig/twig/lib/Twig/Node/Set.php b/lib/twig/twig/lib/Twig/Node/Set.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Set.php rename to lib/twig/twig/lib/Twig/Node/Set.php diff --git a/vendor/twig/twig/lib/Twig/Node/SetTemp.php b/lib/twig/twig/lib/Twig/Node/SetTemp.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/SetTemp.php rename to lib/twig/twig/lib/Twig/Node/SetTemp.php diff --git a/vendor/twig/twig/lib/Twig/Node/Spaceless.php b/lib/twig/twig/lib/Twig/Node/Spaceless.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Spaceless.php rename to lib/twig/twig/lib/Twig/Node/Spaceless.php diff --git a/vendor/twig/twig/lib/Twig/Node/Text.php b/lib/twig/twig/lib/Twig/Node/Text.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Node/Text.php rename to lib/twig/twig/lib/Twig/Node/Text.php diff --git a/vendor/twig/twig/lib/Twig/NodeInterface.php b/lib/twig/twig/lib/Twig/NodeInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/NodeInterface.php rename to lib/twig/twig/lib/Twig/NodeInterface.php diff --git a/vendor/twig/twig/lib/Twig/NodeOutputInterface.php b/lib/twig/twig/lib/Twig/NodeOutputInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/NodeOutputInterface.php rename to lib/twig/twig/lib/Twig/NodeOutputInterface.php diff --git a/vendor/twig/twig/lib/Twig/NodeTraverser.php b/lib/twig/twig/lib/Twig/NodeTraverser.php similarity index 100% rename from vendor/twig/twig/lib/Twig/NodeTraverser.php rename to lib/twig/twig/lib/Twig/NodeTraverser.php diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php b/lib/twig/twig/lib/Twig/NodeVisitor/Escaper.php similarity index 100% rename from vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php rename to lib/twig/twig/lib/Twig/NodeVisitor/Escaper.php diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php b/lib/twig/twig/lib/Twig/NodeVisitor/Optimizer.php similarity index 100% rename from vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php rename to lib/twig/twig/lib/Twig/NodeVisitor/Optimizer.php diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php b/lib/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php similarity index 100% rename from vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php rename to lib/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php b/lib/twig/twig/lib/Twig/NodeVisitor/Sandbox.php similarity index 100% rename from vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php rename to lib/twig/twig/lib/Twig/NodeVisitor/Sandbox.php diff --git a/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php b/lib/twig/twig/lib/Twig/NodeVisitorInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/NodeVisitorInterface.php rename to lib/twig/twig/lib/Twig/NodeVisitorInterface.php diff --git a/vendor/twig/twig/lib/Twig/Parser.php b/lib/twig/twig/lib/Twig/Parser.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Parser.php rename to lib/twig/twig/lib/Twig/Parser.php diff --git a/vendor/twig/twig/lib/Twig/ParserInterface.php b/lib/twig/twig/lib/Twig/ParserInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/ParserInterface.php rename to lib/twig/twig/lib/Twig/ParserInterface.php diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php b/lib/twig/twig/lib/Twig/Sandbox/SecurityError.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php rename to lib/twig/twig/lib/Twig/Sandbox/SecurityError.php diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php b/lib/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php rename to lib/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php b/lib/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php rename to lib/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php diff --git a/vendor/twig/twig/lib/Twig/SimpleFilter.php b/lib/twig/twig/lib/Twig/SimpleFilter.php similarity index 100% rename from vendor/twig/twig/lib/Twig/SimpleFilter.php rename to lib/twig/twig/lib/Twig/SimpleFilter.php diff --git a/vendor/twig/twig/lib/Twig/SimpleFunction.php b/lib/twig/twig/lib/Twig/SimpleFunction.php similarity index 100% rename from vendor/twig/twig/lib/Twig/SimpleFunction.php rename to lib/twig/twig/lib/Twig/SimpleFunction.php diff --git a/vendor/twig/twig/lib/Twig/SimpleTest.php b/lib/twig/twig/lib/Twig/SimpleTest.php similarity index 100% rename from vendor/twig/twig/lib/Twig/SimpleTest.php rename to lib/twig/twig/lib/Twig/SimpleTest.php diff --git a/vendor/twig/twig/lib/Twig/Template.php b/lib/twig/twig/lib/Twig/Template.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Template.php rename to lib/twig/twig/lib/Twig/Template.php diff --git a/vendor/twig/twig/lib/Twig/TemplateInterface.php b/lib/twig/twig/lib/Twig/TemplateInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TemplateInterface.php rename to lib/twig/twig/lib/Twig/TemplateInterface.php diff --git a/vendor/twig/twig/lib/Twig/Test.php b/lib/twig/twig/lib/Twig/Test.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Test.php rename to lib/twig/twig/lib/Twig/Test.php diff --git a/vendor/twig/twig/lib/Twig/Test/Function.php b/lib/twig/twig/lib/Twig/Test/Function.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Test/Function.php rename to lib/twig/twig/lib/Twig/Test/Function.php diff --git a/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php b/lib/twig/twig/lib/Twig/Test/IntegrationTestCase.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php rename to lib/twig/twig/lib/Twig/Test/IntegrationTestCase.php diff --git a/vendor/twig/twig/lib/Twig/Test/Method.php b/lib/twig/twig/lib/Twig/Test/Method.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Test/Method.php rename to lib/twig/twig/lib/Twig/Test/Method.php diff --git a/vendor/twig/twig/lib/Twig/Test/Node.php b/lib/twig/twig/lib/Twig/Test/Node.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Test/Node.php rename to lib/twig/twig/lib/Twig/Test/Node.php diff --git a/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php b/lib/twig/twig/lib/Twig/Test/NodeTestCase.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Test/NodeTestCase.php rename to lib/twig/twig/lib/Twig/Test/NodeTestCase.php diff --git a/vendor/twig/twig/lib/Twig/TestCallableInterface.php b/lib/twig/twig/lib/Twig/TestCallableInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TestCallableInterface.php rename to lib/twig/twig/lib/Twig/TestCallableInterface.php diff --git a/vendor/twig/twig/lib/Twig/TestInterface.php b/lib/twig/twig/lib/Twig/TestInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TestInterface.php rename to lib/twig/twig/lib/Twig/TestInterface.php diff --git a/vendor/twig/twig/lib/Twig/Token.php b/lib/twig/twig/lib/Twig/Token.php similarity index 100% rename from vendor/twig/twig/lib/Twig/Token.php rename to lib/twig/twig/lib/Twig/Token.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser.php b/lib/twig/twig/lib/Twig/TokenParser.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser.php rename to lib/twig/twig/lib/Twig/TokenParser.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php b/lib/twig/twig/lib/Twig/TokenParser/AutoEscape.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php rename to lib/twig/twig/lib/Twig/TokenParser/AutoEscape.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Block.php b/lib/twig/twig/lib/Twig/TokenParser/Block.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Block.php rename to lib/twig/twig/lib/Twig/TokenParser/Block.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Do.php b/lib/twig/twig/lib/Twig/TokenParser/Do.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Do.php rename to lib/twig/twig/lib/Twig/TokenParser/Do.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Embed.php b/lib/twig/twig/lib/Twig/TokenParser/Embed.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Embed.php rename to lib/twig/twig/lib/Twig/TokenParser/Embed.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Extends.php b/lib/twig/twig/lib/Twig/TokenParser/Extends.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Extends.php rename to lib/twig/twig/lib/Twig/TokenParser/Extends.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Filter.php b/lib/twig/twig/lib/Twig/TokenParser/Filter.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Filter.php rename to lib/twig/twig/lib/Twig/TokenParser/Filter.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Flush.php b/lib/twig/twig/lib/Twig/TokenParser/Flush.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Flush.php rename to lib/twig/twig/lib/Twig/TokenParser/Flush.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/For.php b/lib/twig/twig/lib/Twig/TokenParser/For.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/For.php rename to lib/twig/twig/lib/Twig/TokenParser/For.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/From.php b/lib/twig/twig/lib/Twig/TokenParser/From.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/From.php rename to lib/twig/twig/lib/Twig/TokenParser/From.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/If.php b/lib/twig/twig/lib/Twig/TokenParser/If.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/If.php rename to lib/twig/twig/lib/Twig/TokenParser/If.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Import.php b/lib/twig/twig/lib/Twig/TokenParser/Import.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Import.php rename to lib/twig/twig/lib/Twig/TokenParser/Import.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Include.php b/lib/twig/twig/lib/Twig/TokenParser/Include.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Include.php rename to lib/twig/twig/lib/Twig/TokenParser/Include.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Macro.php b/lib/twig/twig/lib/Twig/TokenParser/Macro.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Macro.php rename to lib/twig/twig/lib/Twig/TokenParser/Macro.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php b/lib/twig/twig/lib/Twig/TokenParser/Sandbox.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php rename to lib/twig/twig/lib/Twig/TokenParser/Sandbox.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Set.php b/lib/twig/twig/lib/Twig/TokenParser/Set.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Set.php rename to lib/twig/twig/lib/Twig/TokenParser/Set.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php b/lib/twig/twig/lib/Twig/TokenParser/Spaceless.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php rename to lib/twig/twig/lib/Twig/TokenParser/Spaceless.php diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Use.php b/lib/twig/twig/lib/Twig/TokenParser/Use.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParser/Use.php rename to lib/twig/twig/lib/Twig/TokenParser/Use.php diff --git a/vendor/twig/twig/lib/Twig/TokenParserBroker.php b/lib/twig/twig/lib/Twig/TokenParserBroker.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParserBroker.php rename to lib/twig/twig/lib/Twig/TokenParserBroker.php diff --git a/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php b/lib/twig/twig/lib/Twig/TokenParserBrokerInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php rename to lib/twig/twig/lib/Twig/TokenParserBrokerInterface.php diff --git a/vendor/twig/twig/lib/Twig/TokenParserInterface.php b/lib/twig/twig/lib/Twig/TokenParserInterface.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenParserInterface.php rename to lib/twig/twig/lib/Twig/TokenParserInterface.php diff --git a/vendor/twig/twig/lib/Twig/TokenStream.php b/lib/twig/twig/lib/Twig/TokenStream.php similarity index 100% rename from vendor/twig/twig/lib/Twig/TokenStream.php rename to lib/twig/twig/lib/Twig/TokenStream.php diff --git a/vendor/twig/twig/phpunit.xml.dist b/lib/twig/twig/phpunit.xml.dist similarity index 100% rename from vendor/twig/twig/phpunit.xml.dist rename to lib/twig/twig/phpunit.xml.dist diff --git a/plugins/index.html b/plugins/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/index.html b/themes/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/index.html b/vendor/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/michelf/php-markdown/License.md b/vendor/michelf/php-markdown/License.md deleted file mode 100644 index 027becb..0000000 --- a/vendor/michelf/php-markdown/License.md +++ /dev/null @@ -1,36 +0,0 @@ -PHP Markdown Lib -Copyright (c) 2004-2013 Michel Fortin - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2006 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. diff --git a/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php b/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php deleted file mode 100644 index 267bf16..0000000 --- a/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php +++ /dev/null @@ -1,40 +0,0 @@ - -# -# Original Markdown -# Copyright (c) 2004-2006 John Gruber -# -# -namespace Michelf; - - -# Just force Michelf/Markdown.php to load. This is needed to load -# the temporary implementation class. See below for details. -\Michelf\Markdown::MARKDOWNLIB_VERSION; - -# -# Markdown Extra Parser Class -# -# Note: Currently the implementation resides in the temporary class -# \Michelf\MarkdownExtra_TmpImpl (in the same file as \Michelf\Markdown). -# This makes it easier to propagate the changes between the three different -# packaging styles of PHP Markdown. Once this issue is resolved, the -# _MarkdownExtra_TmpImpl will disappear and this one will contain the code. -# - -class MarkdownExtra extends \Michelf\_MarkdownExtra_TmpImpl { - - ### Parser Implementation ### - - # Temporarily, the implemenation is in the _MarkdownExtra_TmpImpl class. - # See note above. - -} - - -?> \ No newline at end of file diff --git a/vendor/michelf/php-markdown/Readme.md b/vendor/michelf/php-markdown/Readme.md deleted file mode 100644 index 8ee5fae..0000000 --- a/vendor/michelf/php-markdown/Readme.md +++ /dev/null @@ -1,259 +0,0 @@ -PHP Markdown -============ - -PHP Markdown Lib 1.3 - 11 Apr 2013 - -by Michel Fortin - - -based on Markdown by John Gruber - - - -Introduction ------------- - -This is a library package that includes the PHP Markdown parser and its -sibling PHP Markdown Extra which additional features. - -Markdown is a text-to-HTML conversion tool for web writers. Markdown -allows you to write using an easy-to-read, easy-to-write plain text -format, then convert it to structurally valid XHTML (or HTML). - -"Markdown" is two things: a plain text markup syntax, and a software -tool, written in Perl, that converts the plain text markup to HTML. -PHP Markdown is a port to PHP of the original Markdown program by -John Gruber. - -PHP Markdown can work as a plug-in for WordPress, as a modifier for -the Smarty templating engine, or as a replacement for Textile -formatting in any software that supports Textile. - -Full documentation of Markdown's syntax is available on John's -Markdown page: - - -Requirement ------------ - -This library package requires PHP 5.3 or later. - -Note: The older plugin/library hybrid package for PHP Markdown and -PHP Markdown Extra is still maintained and will work with PHP 4.0.5 and later. - -Before PHP 5.3.7, pcre.backtrack_limit defaults to 100 000, which is too small -in many situations. You might need to set it to higher values. Later PHP -releases defaults to 1 000 000, which is usually fine. - - -Usage ------ - -This library package is meant to be used with class autoloading. For autoloading -to work, your project needs have setup a PSR-0-compatible autoloader. See the -included Readme.php file for a minimal autoloader setup. (If you don't want to -use autoloading you can do a classic `require_once` to manually include the -files prior use instead.) - -With class autoloading in place, putting the 'Michelf' folder in your -include path should be enough for this to work: - - use \Michelf\Markdown; - $my_html = Markdown::defaultTransform($my_text); - -Markdown Extra syntax is also available the same way: - - use \Michelf\MarkdownExtra; - $my_html = MarkdownExtra::defaultTransform($my_text); - -If you wish to use PHP Markdown with another text filter function -built to parse HTML, you should filter the text *after* the `transform` -function call. This is an example with [PHP SmartyPants][psp]: - - use \Michelf\Markdown, \Michelf\SmartyPants; - $my_html = Markdown::defaultTransform($my_text); - $my_html = SmartyPants::defaultTransform($my_html); - -All these examples are using the static `defaultTransform` static function -found inside the parser class. If you want to customize the parser -configuration, you can also instantiate it directly and change some -configuration variables: - - use \Michelf\MarkdownExtra; - $parser = new MarkdownExtra; - $parser->fn_id_prefix = "post22-"; - $my_html = $parser->transform($my_text); - - -Usage ------ - -This library package is meant to be used with class autoloading. For autoloading -to work, your project needs have setup a PSR-0-compatible autoloader. See the -included Readme.php file for a minimal autoloader setup. (If you don't want to -use autoloading you can do a classic `require_once` to manually include the -files prior use instead.) - -With class autoloading in place, putting the 'Michelf' folder in your -include path should be enough for this to work: - - use \Michelf\Markdown; - $my_html = Markdown::defaultTransform($my_text); - -Markdown Extra syntax is also available the same way: - - use \Michelf\MarkdownExtra; - $my_html = MarkdownExtra::defaultTransform($my_text); - -If you wish to use PHP Markdown with another text filter function -built to parse HTML, you should filter the text *after* the `transform` -function call. This is an example with [PHP SmartyPants][psp]: - - use \Michelf\Markdown, \Michelf\SmartyPants; - $my_html = Markdown::defaultTransform($my_text); - $my_html = SmartyPants::defaultTransform($my_html); - -All these examples are using the static `defaultTransform` static function -found inside the parser class. If you want to customize the parser -configuration, you can also instantiate it directly and change some -configuration variables: - - use \Michelf\MarkdownExtra; - $parser = new MarkdownExtra; - $parser->fn_id_prefix = "post22-"; - $my_html = $parser->transform($my_text); - -To learn more, see the full list of [configuration variables]. - - [configuration variables]: http://michelf.ca/project/php-markdown/configuration/ - - -Public API and Versionning Policy ---------------------------------- - -Version numbers are of the form *major*.*minor*.*patch*. - -The public API of PHP Markdown consist of the two parser classes `Markdown` -and `MarkdownExtra`, their constructors, the `transform` and `defaultTransform` -functions and their configuration variables. The public API is stable for -a given major version number. It might get additions when the minor version -number increments. - -**Protected members are not considered public API.** This is unconventionnal -and deserves an explanation. Incrementing the major version number every time -the underlying implementation of something changes is going to give nonsential -version numbers for the vast majority of people who just use the parser. -Protected members are meant to create parser subclasses that behave in -different ways. Very few people create parser subclasses. I don't want to -discourage it by making everything private, but at the same time I can't -guarenty any stable hook between versions if you use protected members. - -**Syntax changes** will increment the minor number for new features, and the -patch number for small corrections. A *new feature* is something that needs a -change in the syntax documentation. Note that since PHP Markdown Lib includes -two parsers, a syntax change for either of them will increment the minor -number. Also note that there is nothigng perfectly backward-compatible with the -Markdown syntax: all inputs are always valid, so new features always replace -something that was previously legal, although generally non-sensial to do. - - -Bugs ----- - -To file bug reports please send email to: - - -Please include with your report: (1) the example input; (2) the output you -expected; (3) the output PHP Markdown actually produced. - -If you have a problem where Markdown gives you an empty result, first check -that the backtrack limit is not too low by running `php --info | grep pcre`. -See Installation and Requirement above for details. - - -Version History ---------------- - -PHP Markdown Lib 1.3 (11 Apr 2013): - -This is the first release of PHP Markdown Lib. This package requires PHP -version 4.3 or later and is designed to work with PSR-0 autoloading and, -optionally with Composer. Here is a list of the changes since -PHP Markdown Extra 1.2.6: - -* Plugin interface for Wordpress and other systems is no longer present in - the Lib package. The classic package is still available if you need it: - - -* Added `public` and `protected` protection attributes, plus a section about - what is "public API" and what isn't in the Readme file. - -* Changed HTML output for footnotes: now instead of adding `rel` and `rev` - attributes, footnotes links have the class name `footnote-ref` and - backlinks `footnote-backref`. - -* Fixed some regular expressions to make PCRE not shout warnings about POSIX - collation classes (dependent on your version of PCRE). - -* Added optional class and id attributes to images and links using the same - syntax as for headers: - - [link](url){#id .class} - ![img](url){#id .class} - - It work too for reference-style links and images. In this case you need - to put those attributes at the reference definition: - - [link][linkref] or [linkref] - ![img][linkref] - - [linkref]: url "optional title" {#id .class} - -* Fixed a PHP notice message triggered when some table column separator - markers are missing on the separator line below column headers. - -* Fixed a small mistake that could cause the parser to retain an invalid - state related to parsing links across multiple runs. This was never - observed (that I know of), but it's still worth fixing. - - -Copyright and License ---------------------- - -PHP Markdown Lib -Copyright (c) 2004-2013 Michel Fortin - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2005 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the - distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. diff --git a/vendor/michelf/php-markdown/Readme.php b/vendor/michelf/php-markdown/Readme.php deleted file mode 100644 index 75e23e0..0000000 --- a/vendor/michelf/php-markdown/Readme.php +++ /dev/null @@ -1,31 +0,0 @@ - - - - - PHP Markdown Lib - Readme - - - - - diff --git a/vendor/michelf/php-markdown/composer.json b/vendor/michelf/php-markdown/composer.json deleted file mode 100644 index 670fc96..0000000 --- a/vendor/michelf/php-markdown/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "michelf/php-markdown", - "type": "library", - "description": "PHP Markdown", - "homepage": "http://michelf.ca/projects/php-markdown/", - "keywords": ["markdown"], - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Michel Fortin", - "email": "michel.fortin@michelf.ca", - "homepage": "http://michelf.ca/", - "role": "Developer" - }, - { - "name": "John Gruber", - "homepage": "http://daringfireball.net/" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-0": { "Michelf": "" } - }, - "extra": { - "branch-alias": { - "dev-lib": "1.3.x-dev" - } - } -}