Skip to content
Permalink
Browse files

Textile v3.7.3

Thanks Gocom
  • Loading branch information...
philwareham committed Sep 2, 2019
1 parent 8ccbc1a commit 1f439aea49af827fed550266ddc5d015f01be0af
Showing with 15 additions and 20 deletions.
  1. +1 −1 HISTORY.txt
  2. +1 −1 package.json
  3. +12 −17 textpattern/vendors/Netcarver/Textile/Parser.php
  4. +1 −1 textpattern/vendors/Netcarver/Textile/Tag.php
@@ -15,7 +15,7 @@ Changes in TBC (upcoming)
* Removed: Obsolete 'no widowed words' preference setting. If this feature is
needed it can be implemented directly with <txp:title /> tag.
* Developer: PHP magic_quotes_gpc and magic_quotes_runtime support removed.
* Textile 3.7.2. See https://github.com/textile/php-textile/releases/tag/v3.7.2
* Textile 3.7.3. See https://github.com/textile/php-textile/releases/tag/v3.7.3
for full list of changes in this release (thanks, gocom).
* jQuery 3.4.1.
* PrismJS 1.17.1.
@@ -62,7 +62,7 @@
"copy:jquery-ui": "rimraf textpattern/vendors/jquery/jquery-ui/jquery-ui.js && cp node_modules/jquery-ui-dist/jquery-ui.min.js textpattern/vendors/jquery/jquery-ui/jquery-ui.js",
"copy:prismjs": "uglifyjs -c -m -o textpattern/vendors/PrismJS/prism/prism.js node_modules/prismjs/prism.js node_modules/prismjs/components/prism-markup-templating.js node_modules/prismjs/components/prism-bash.js node_modules/prismjs/components/prism-json.js node_modules/prismjs/components/prism-markdown.js node_modules/prismjs/components/prism-php.js node_modules/prismjs/components/prism-textile.js",
"copy:textile": "sh .github/copy-textile.sh",
"get-dependencies": "npm run copy:blueimp-file-upload && npm run copy:jquery && npm run copy:jquery-ui && npm run copy:prismjs && npm run copy:textile v3.7.2",
"get-dependencies": "npm run copy:blueimp-file-upload && npm run copy:jquery && npm run copy:jquery-ui && npm run copy:prismjs && npm run copy:textile v3.7.3",
"get-pophelp": "sh .github/get-pophelp.sh",
"get-textpacks": "sh .github/get-textpacks.sh",
"get-classic-admin-theme": "sh .github/get-classic-admin-theme.sh",
@@ -371,7 +371,7 @@ class Parser
* @var string
*/
protected $ver = '3.7.2';
protected $ver = '3.7.3';
/**
* Regular expression snippets.
@@ -1926,7 +1926,7 @@ public function textileEncode($text)
*
* bc. <h1>Hello World!</h1>
*
* Additinally the parser can be run in safe, restricted mode using the
* Additionally the parser can be run in safe, restricted mode using the
* Parser::setRestricted() method.
*
* bc. $parser = new \Netcarver\Textile\Parser();
@@ -2384,10 +2384,10 @@ protected function prepare($lite = null, $noimage = null, $rel = null)
$this->patterns = array(
'block' => '/^(?:'.$block.')$/i',
'contained' => '/^<\/?(?P<open>[^\s<>\/]+)(?:\s.*|\/?>.*|)>$/si',
'divider' => '/^(?:<\/?('.$divider.')(?:\s[^<>]*?|\/?)>(?:<\/\1\s*?>)?)+$/smi',
'divider' => '/^(?:<\/?('.$divider.')(?:\s[^<>]*?|\/?)>(?:<\/\1\s*?>)?)+$/si',
'phrasing' => '/^(?:'.$phrasing.')$/i',
'wrapped' => '/^<\/?(?P<open>[^\s<>\/]+)[^<>]*?>(?:.*<\/\1\s*?>)?$/si',
'unwrappable' => '/<\/?(?:'.$block.')(?:\s[^<>]*?|\/?)>/smi',
'unwrappable' => '/<\/?(?:'.$block.')(?:\s[^<>]*?|\/?)>/si',
);
}
@@ -2511,8 +2511,6 @@ protected function parseAttribsToArray($in, $element = '', $include_id = true, $
$span = '';
$width = '';
$id = '';
$atts = '';
$align = '';
$matched = $in;
if ($element == 'td') {
@@ -3019,6 +3017,7 @@ protected function fTextileList($m)
$prev = false;
$out = array();
$lists = array();
$litem = '';
if ($lines === false) {
return '';
@@ -3103,6 +3102,8 @@ protected function fTextileList($m)
}
} elseif ($showitem) {
$line = "$tabs\t<$litem$atts>$content";
} else {
$line = '';
}
if ((!$next || $next['level'] <= $m['level']) && $showitem) {
@@ -3274,7 +3275,6 @@ protected function blocks($text)
$tag = 'p';
$atts = '';
$cite = '';
$graf = '';
$eat = false;
}
@@ -3810,7 +3810,6 @@ protected function fNoteLists($m)
if ($this->notes) {
foreach ($this->notes as $seq => $info) {
$links = $this->makeBackrefLink($info, $m['links'], $m['startchar']);
$atts = '';
if (!empty($info['def'])) {
$out[] = "\t".'<li'.$info['def']['atts'].'>'.$links.
@@ -3854,8 +3853,6 @@ protected function fNoteLists($m)
protected function makeBackrefLink($info, $g_links, $i)
{
$id = '';
$backlink_type = !empty($info['def']) && $info['def']['link'] ? $info['def']['link'] : $g_links;
$allow_inc = (false === strpos($this->syms, $i));
@@ -4281,7 +4278,6 @@ protected function fLink($m)
$m = array();
$pop = $tight = '';
$url_chars = array();
$counts = array(
'[' => null,
']' => substr_count($url, ']'), # We need to know how many closing square brackets we have
@@ -4317,7 +4313,6 @@ protected function fLink($m)
// Does this need to be mb_ enabled? We are only searching for text in the ASCII charset anyway
// Create an array of (possibly) multi-byte characters.
// This is going to allow us to pop off any non-matched or nonsense chars from the url
$len = strlen($url);
$url_chars = str_split($url);
// Now we have the array of all the multi-byte chars in the url we will parse the
@@ -4676,14 +4671,14 @@ protected function images($text)
'/
(?:[[{])? # pre
\! # opening !
(?P<align>\<|\=|\>|&lt;|&gt;)? # optional alignment $algn
(?P<atts>'.$this->cls.') # optional style,class atts $atts
(?P<align>\<|\=|\>|&lt;|&gt;)? # optional alignment
(?P<atts>'.$this->cls.') # optional attributes
(?:\.\s)? # optional dot-space
(?P<url>[^\s(!]+) # presume this is the src $url
(?P<url>[^\s(!]+) # presume this is the src
\s? # optional space
(?:\((?P<title>[^\)]+)\))? # optional title $title
(?:\((?P<title>[^\)]+)\))? # optional title
\! # closing
(?::(?P<href>\S+)(?<![\]).,]))? # optional href sans final punct. $href
(?::(?P<href>\S+)(?<![\]).,]))? # optional href sans final punct
(?:[\]}]|(?=[.,\s)|]|$)) # lookahead: space,.)| or end of string ("|" needed if image in table cell)
/x'.$this->regex_snippets['mod'],
array($this, "fImage"),
@@ -52,7 +52,7 @@
*
* @method Tag alt(string $text)
* @method Tag align(string $alignment)
* @method Tag href(string $url, bool $allowEmpty)
* @method Tag href(string $url, bool $allowEmpty = false)
* @method Tag rel(string $relationship)
* @method Tag title(string $title)
* @internal

0 comments on commit 1f439ae

Please sign in to comment.
You can’t perform that action at this time.