Remove version and others fields

This commit is contained in:
dignajar 2015-09-26 23:24:41 -03:00
parent 6da2534586
commit c93e044128
22 changed files with 58 additions and 163 deletions

View File

@ -17,7 +17,7 @@ class Parsedown
{ {
# ~ # ~
const version = '1.5.3'; const version = '1.5.4';
# ~ # ~
@ -107,12 +107,6 @@ class Parsedown
# ~ # ~
protected $DefinitionTypes = array(
'[' => array('Reference'),
);
# ~
protected $unmarkedBlockTypes = array( protected $unmarkedBlockTypes = array(
'Code', 'Code',
); );
@ -169,7 +163,7 @@ class Parsedown
# ~ # ~
if (isset($CurrentBlock['incomplete'])) if (isset($CurrentBlock['continuable']))
{ {
$Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock);
@ -185,8 +179,6 @@ class Parsedown
{ {
$CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock);
} }
unset($CurrentBlock['incomplete']);
} }
} }
@ -226,7 +218,7 @@ class Parsedown
if (method_exists($this, 'block'.$blockType.'Continue')) if (method_exists($this, 'block'.$blockType.'Continue'))
{ {
$Block['incomplete'] = true; $Block['continuable'] = true;
} }
$CurrentBlock = $Block; $CurrentBlock = $Block;
@ -253,7 +245,7 @@ class Parsedown
# ~ # ~
if (isset($CurrentBlock['incomplete']) and method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) if (isset($CurrentBlock['continuable']) and method_exists($this, 'block'.$CurrentBlock['type'].'Complete'))
{ {
$CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock);
} }
@ -394,16 +386,16 @@ class Parsedown
protected function blockFencedCode($Line) protected function blockFencedCode($Line)
{ {
if (preg_match('/^(['.$Line['text'][0].']{3,})[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches)) if (preg_match('/^['.$Line['text'][0].']{3,}[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches))
{ {
$Element = array( $Element = array(
'name' => 'code', 'name' => 'code',
'text' => '', 'text' => '',
); );
if (isset($matches[2])) if (isset($matches[1]))
{ {
$class = 'language-'.$matches[2]; $class = 'language-'.$matches[1];
$Element['attributes'] = array( $Element['attributes'] = array(
'class' => $class, 'class' => $class,
@ -673,7 +665,9 @@ class Parsedown
if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches)) if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches))
{ {
if (in_array($matches[1], $this->textLevelElements)) $element = strtolower($matches[1]);
if (in_array($element, $this->textLevelElements))
{ {
return; return;
} }
@ -987,15 +981,13 @@ class Parsedown
{ {
$markup = ''; $markup = '';
$unexaminedText = $text; # $excerpt is based on the first occurrence of a marker
$markerPosition = 0; while ($excerpt = strpbrk($text, $this->inlineMarkerList))
while ($excerpt = strpbrk($unexaminedText, $this->inlineMarkerList))
{ {
$marker = $excerpt[0]; $marker = $excerpt[0];
$markerPosition += strpos($unexaminedText, $marker); $markerPosition = strpos($text, $marker);
$Excerpt = array('text' => $excerpt, 'context' => $text); $Excerpt = array('text' => $excerpt, 'context' => $text);
@ -1008,34 +1000,42 @@ class Parsedown
continue; continue;
} }
if (isset($Inline['position']) and $Inline['position'] > $markerPosition) # position is ahead of marker # makes sure that the inline belongs to "our" marker
if (isset($Inline['position']) and $Inline['position'] > $markerPosition)
{ {
continue; continue;
} }
# sets a default inline position
if ( ! isset($Inline['position'])) if ( ! isset($Inline['position']))
{ {
$Inline['position'] = $markerPosition; $Inline['position'] = $markerPosition;
} }
# the text that comes before the inline
$unmarkedText = substr($text, 0, $Inline['position']); $unmarkedText = substr($text, 0, $Inline['position']);
# compile the unmarked text
$markup .= $this->unmarkedText($unmarkedText); $markup .= $this->unmarkedText($unmarkedText);
# compile the inline
$markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']);
# remove the examined text
$text = substr($text, $Inline['position'] + $Inline['extent']); $text = substr($text, $Inline['position'] + $Inline['extent']);
$unexaminedText = $text;
$markerPosition = 0;
continue 2; continue 2;
} }
$unexaminedText = substr($excerpt, 1); # the marker does not belong to an inline
$markerPosition ++; $unmarkedText = substr($text, 0, $markerPosition + 1);
$markup .= $this->unmarkedText($unmarkedText);
$text = substr($text, $markerPosition + 1);
} }
$markup .= $this->unmarkedText($text); $markup .= $this->unmarkedText($text);
@ -1476,7 +1476,7 @@ class Parsedown
return self::$instances[$name]; return self::$instances[$name];
} }
$instance = new self(); $instance = new static();
self::$instances[$name] = $instance; self::$instances[$name] = $instance;

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "Disqus", "name": "Disqus",
"description": "Disqus ist eine Kommentar-Plattform für Websites. Um das Plugin verwenden zu können, muss ein Konto bei Disqus.com eingerichtet werden.", "description": "Disqus ist eine Kommentar-Plattform für Websites. Um das Plugin verwenden zu können, muss ein Konto bei Disqus.com eingerichtet werden."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-09-25"
}, },
"disqus-shortname": "Disqus shortname", "disqus-shortname": "Disqus shortname",
"enable-disqus-on-pages": "Disqus auf Seiten verwenden", "enable-disqus-on-pages": "Disqus auf Seiten verwenden",

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "Disqus sistema de comentarios", "name": "Disqus sistema de comentarios",
"description": "Disqus es un servicio de comentarios online. Es necesario registrarse en Disqus.com antes de utilizar este plugin.", "description": "Disqus es un servicio de comentarios online. Es necesario registrarse en Disqus.com antes de utilizar este plugin."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-17"
}, },
"disqus-shortname": "Disqus shortname", "disqus-shortname": "Disqus shortname",
"enable-disqus-on-pages": "Habilitar Disqus en las páginas", "enable-disqus-on-pages": "Habilitar Disqus en las páginas",

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "Disqus système de commentaire", "name": "Disqus système de commentaire",
"description": "Disqus est un service Web de discussion et de commentaires d'articles centralisé avec authentification unique. Il est nécessaire de sinscrire sur Disqus.com avant dutiliser ce plugin.", "description": "Disqus est un service Web de discussion et de commentaires d'articles centralisé avec authentification unique. Il est nécessaire de sinscrire sur Disqus.com avant dutiliser ce plugin."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
}, },
"disqus-shortname": "Votre ID Disqus", "disqus-shortname": "Votre ID Disqus",
"enable-disqus-on-pages": "Activer Disqus sur les pages", "enable-disqus-on-pages": "Activer Disqus sur les pages",

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "Wartungsmodus", "name": "Wartungsmodus",
"description": "Wartungsmodus für die Website mit Zugang zum Admin-Bereich.", "description": "Wartungsmodus für die Website mit Zugang zum Admin-Bereich."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2016-09-25"
}, },
"enable-maintence-mode": "Aktivierung des Wartungsmodus", "enable-maintence-mode": "Aktivierung des Wartungsmodus",

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "Modo mantenimiento", "name": "Modo mantenimiento",
"description": "Configurar el sitio en modo mantenimiento, se puede acceder al panel de administración mientras tanto.", "description": "Configurar el sitio en modo mantenimiento, se puede acceder al panel de administración mientras tanto."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
}, },
"enable-maintence-mode": "Habilitar modo mantenimiento", "enable-maintence-mode": "Habilitar modo mantenimiento",

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "Mode de Maintenance", "name": "Mode de Maintenance",
"description": "Configurer votre site sur le mode de maintenance, vous pouvez accéder à la zone d'administration.", "description": "Configurer votre site sur le mode de maintenance, vous pouvez accéder à la zone d'administration."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
}, },
"enable-maintence-mode": "Activer le mode de maintence", "enable-maintence-mode": "Activer le mode de maintence",

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "維護模式", "name": "維護模式",
"description": "設定您的網站為維護模式,但是您依然可以登入到管理介面", "description": "設定您的網站為維護模式,但是您依然可以登入到管理介面"
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
}, },
"enable-maintence-mode": "啟用維護模式", "enable-maintence-mode": "啟用維護模式",

View File

@ -2,11 +2,6 @@
"plugin-data": "plugin-data":
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "Plugin zur Verwendung des Open Graph Protocols.", "description": "Plugin zur Verwendung des Open Graph Protocols."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-09-25"
} }
} }

View File

@ -2,11 +2,6 @@
"plugin-data": "plugin-data":
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "The Open Graph protocol enables any web page to become a rich object in a social graph.", "description": "The Open Graph protocol enables any web page to become a rich object in a social graph."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
} }
} }

View File

@ -2,11 +2,6 @@
"plugin-data": "plugin-data":
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "El protocolo Open Graph sirve para publicar contenido en las redes sociales.", "description": "El protocolo Open Graph sirve para publicar contenido en las redes sociales."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
} }
} }

View File

@ -2,11 +2,6 @@
"plugin-data": "plugin-data":
{ {
"name": "Open Graph", "name": "Open Graph",
"description": "Permets à nimporte quelle page web de devenir lobjet enrichi dun graphe social. Par exemple, il est utilisé sur Facebook pour permettre à une page web de bénéficier des mêmes fonctionnalités que nimporte quel autre objet sur Facebook.", "description": "Permets à nimporte quelle page web de devenir lobjet enrichi dun graphe social. Par exemple, il est utilisé sur Facebook pour permettre à une page web de bénéficier des mêmes fonctionnalités que nimporte quel autre objet sur Facebook."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
} }
} }

View File

@ -2,11 +2,6 @@
"plugin-data": "plugin-data":
{ {
"name": "開放社交關係圖", "name": "開放社交關係圖",
"description": "開放社交關係圖協定可以讓任何網頁變成豐富的物件", "description": "開放社交關係圖協定可以讓任何網頁變成豐富的物件"
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
} }
} }

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "Liste aller Seiten", "name": "Liste aller Seiten",
"description": "Auflistung aller Seiten.", "description": "Auflistung aller Seiten."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-09-22"
}, },
"home": "Hauptseite", "home": "Hauptseite",

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "Listado de páginas", "name": "Listado de páginas",
"description": "Muestra las paginas en orden según la posición.", "description": "Muestra las paginas en orden según la posición."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
}, },
"home": "Página de inicio", "home": "Página de inicio",

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "Page navigation", "name": "Page navigation",
"description": "Constitue un menu avec les liens des pages dans la colonne du thème.", "description": "Constitue un menu avec les liens des pages dans la colonne du thème."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
}, },
"home": "Accueil", "home": "Accueil",

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "頁面列表", "name": "頁面列表",
"description": "顯示所有頁面的列表", "description": "顯示所有頁面的列表"
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
}, },
"home": "首頁", "home": "首頁",

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "SimpleMDE", "name": "SimpleMDE",
"description": "Ein einfacher und schöner JavaScript-Editor für; Markdown von @WesCossick. Angepasst für Bludit von Diego Najar.", "description": "Ein einfacher und schöner JavaScript-Editor für; Markdown von @WesCossick. Angepasst für Bludit von Diego Najar."
"author": "NextStepWebs",
"email": "",
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"version": "1.7.1",
"releaseDate": "2015-09-25"
}, },
"toolbar": "Werkzeugleiste", "toolbar": "Werkzeugleiste",
"tab-size": "Abstände der Tabstopps" "tab-size": "Abstände der Tabstopps"

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "SimpleMDE", "name": "SimpleMDE",
"description": "Simple, facil y hermoso editor Markdown desarrollado por @WesCossick. Adaptado por Diego Najar para Bludit.", "description": "Simple, facil y hermoso editor Markdown desarrollado por @WesCossick. Adaptado por Diego Najar para Bludit."
"author": "NextStepWebs",
"email": "",
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"version": "1.7.1",
"releaseDate": "2015-09-18"
}, },
"toolbar": "Barra de herramientas", "toolbar": "Barra de herramientas",
"tab-size": "Tamaño de la tabulación" "tab-size": "Tamaño de la tabulación"

View File

@ -2,12 +2,7 @@
"plugin-data": "plugin-data":
{ {
"name": "SimpleMDE", "name": "SimpleMDE",
"description": "Un éditeur Markdown en JavaScript simple, beau, et intégrable.", "description": "Un éditeur Markdown en JavaScript simple, beau, et intégrable."
"author": "NextStepWebs",
"email": "",
"website": "https://github.com/NextStepWebs/simplemde-markdown-editor",
"version": "1.7.1",
"releaseDate": "2015-09-18"
}, },
"toolbar": "Toolbar", "toolbar": "Toolbar",
"tab-size": "Tab size" "tab-size": "Tab size"

View File

@ -2,11 +2,6 @@
"plugin-data": "plugin-data":
{ {
"name": "Liste aller Schlagwörter", "name": "Liste aller Schlagwörter",
"description": "Anzeige aller Schlagwörter.", "description": "Anzeige aller Schlagwörter."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-09-25"
} }
} }

View File

@ -2,11 +2,6 @@
"plugin-data": "plugin-data":
{ {
"name": "Liste de mots clés", "name": "Liste de mots clés",
"description": "Affiche la lise de tous les mots clés.", "description": "Affiche la lise de tous les mots clés."
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
} }
} }