From c93e044128a6eb3464a1f82297051429bcbea514 Mon Sep 17 00:00:00 2001 From: dignajar Date: Sat, 26 Sep 2015 23:24:41 -0300 Subject: [PATCH] Remove version and others fields --- kernel/parsedown.class.php | 60 +++++++++++----------- plugins/disqus/languages/de_DE.json | 7 +-- plugins/disqus/languages/es_AR.json | 7 +-- plugins/disqus/languages/fr_FR.json | 7 +-- plugins/maintancemode/languages/de_DE.json | 9 +--- plugins/maintancemode/languages/es_AR.json | 7 +-- plugins/maintancemode/languages/fr_FR.json | 7 +-- plugins/maintancemode/languages/zh_TW.json | 9 +--- plugins/opengraph/languages/de_DE.json | 9 +--- plugins/opengraph/languages/en_US.json | 7 +-- plugins/opengraph/languages/es_AR.json | 7 +-- plugins/opengraph/languages/fr_FR.json | 7 +-- plugins/opengraph/languages/zh_TW.json | 7 +-- plugins/pages/languages/de_DE.json | 9 +--- plugins/pages/languages/es_AR.json | 7 +-- plugins/pages/languages/fr_FR.json | 7 +-- plugins/pages/languages/zh_TW.json | 9 +--- plugins/simplemde/languages/de_DE.json | 9 +--- plugins/simplemde/languages/es_AR.json | 7 +-- plugins/simplemde/languages/fr_FR.json | 7 +-- plugins/tags/languages/de_DE.json | 9 +--- plugins/tags/languages/fr_FR.json | 7 +-- 22 files changed, 58 insertions(+), 163 deletions(-) diff --git a/kernel/parsedown.class.php b/kernel/parsedown.class.php index 55640fb2..d7e1e034 100644 --- a/kernel/parsedown.class.php +++ b/kernel/parsedown.class.php @@ -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( 'Code', ); @@ -169,7 +163,7 @@ class Parsedown # ~ - if (isset($CurrentBlock['incomplete'])) + if (isset($CurrentBlock['continuable'])) { $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); @@ -185,8 +179,6 @@ class Parsedown { $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); } - - unset($CurrentBlock['incomplete']); } } @@ -226,7 +218,7 @@ class Parsedown if (method_exists($this, 'block'.$blockType.'Continue')) { - $Block['incomplete'] = true; + $Block['continuable'] = true; } $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); } @@ -394,16 +386,16 @@ class Parsedown 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( 'name' => 'code', 'text' => '', ); - if (isset($matches[2])) + if (isset($matches[1])) { - $class = 'language-'.$matches[2]; + $class = 'language-'.$matches[1]; $Element['attributes'] = array( 'class' => $class, @@ -673,7 +665,9 @@ class Parsedown 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; } @@ -987,15 +981,13 @@ class Parsedown { $markup = ''; - $unexaminedText = $text; + # $excerpt is based on the first occurrence of a marker - $markerPosition = 0; - - while ($excerpt = strpbrk($unexaminedText, $this->inlineMarkerList)) + while ($excerpt = strpbrk($text, $this->inlineMarkerList)) { $marker = $excerpt[0]; - $markerPosition += strpos($unexaminedText, $marker); + $markerPosition = strpos($text, $marker); $Excerpt = array('text' => $excerpt, 'context' => $text); @@ -1008,34 +1000,42 @@ class Parsedown 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; } + # sets a default inline position + if ( ! isset($Inline['position'])) { $Inline['position'] = $markerPosition; } + # the text that comes before the inline $unmarkedText = substr($text, 0, $Inline['position']); + # compile the unmarked text $markup .= $this->unmarkedText($unmarkedText); + # compile the inline $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); + # remove the examined text $text = substr($text, $Inline['position'] + $Inline['extent']); - $unexaminedText = $text; - - $markerPosition = 0; - 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); @@ -1476,7 +1476,7 @@ class Parsedown return self::$instances[$name]; } - $instance = new self(); + $instance = new static(); self::$instances[$name] = $instance; @@ -1525,4 +1525,4 @@ class Parsedown 'wbr', 'span', 'time', ); -} +} \ No newline at end of file diff --git a/plugins/disqus/languages/de_DE.json b/plugins/disqus/languages/de_DE.json index fa9a1f01..8c5a30d8 100644 --- a/plugins/disqus/languages/de_DE.json +++ b/plugins/disqus/languages/de_DE.json @@ -2,12 +2,7 @@ "plugin-data": { "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.", - "author": "Bludit", - "email": "", - "website": "http://www.bludit.com", - "version": "0.1", - "releaseDate": "2015-09-25" + "description": "Disqus ist eine Kommentar-Plattform für Websites. Um das Plugin verwenden zu können, muss ein Konto bei Disqus.com eingerichtet werden." }, "disqus-shortname": "Disqus shortname", "enable-disqus-on-pages": "Disqus auf Seiten verwenden", diff --git a/plugins/disqus/languages/es_AR.json b/plugins/disqus/languages/es_AR.json index 4f67f2ec..f956f048 100644 --- a/plugins/disqus/languages/es_AR.json +++ b/plugins/disqus/languages/es_AR.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "Disqus sistema de comentarios", - "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" + "description": "Disqus es un servicio de comentarios online. Es necesario registrarse en Disqus.com antes de utilizar este plugin." }, "disqus-shortname": "Disqus shortname", "enable-disqus-on-pages": "Habilitar Disqus en las páginas", diff --git a/plugins/disqus/languages/fr_FR.json b/plugins/disqus/languages/fr_FR.json index 146eaf44..ffe5c999 100644 --- a/plugins/disqus/languages/fr_FR.json +++ b/plugins/disqus/languages/fr_FR.json @@ -2,12 +2,7 @@ "plugin-data": { "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 s’inscrire sur Disqus.com avant d’utiliser ce plugin.", - "author": "Bludit", - "email": "", - "website": "http://www.bludit.com", - "version": "0.1", - "releaseDate": "2015-08-02" + "description": "Disqus est un service Web de discussion et de commentaires d'articles centralisé avec authentification unique. Il est nécessaire de s’inscrire sur Disqus.com avant d’utiliser ce plugin." }, "disqus-shortname": "Votre ID Disqus", "enable-disqus-on-pages": "Activer Disqus sur les pages", diff --git a/plugins/maintancemode/languages/de_DE.json b/plugins/maintancemode/languages/de_DE.json index 58fec6b2..369cec5a 100644 --- a/plugins/maintancemode/languages/de_DE.json +++ b/plugins/maintancemode/languages/de_DE.json @@ -2,14 +2,9 @@ "plugin-data": { "name": "Wartungsmodus", - "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" + "description": "Wartungsmodus für die Website mit Zugang zum Admin-Bereich." }, "enable-maintence-mode": "Aktivierung des Wartungsmodus", "message": "Auf der Website angezeigter Hinweis" -} +} \ No newline at end of file diff --git a/plugins/maintancemode/languages/es_AR.json b/plugins/maintancemode/languages/es_AR.json index eea7b378..cad06dfa 100644 --- a/plugins/maintancemode/languages/es_AR.json +++ b/plugins/maintancemode/languages/es_AR.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "Modo mantenimiento", - "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" + "description": "Configurar el sitio en modo mantenimiento, se puede acceder al panel de administración mientras tanto." }, "enable-maintence-mode": "Habilitar modo mantenimiento", diff --git a/plugins/maintancemode/languages/fr_FR.json b/plugins/maintancemode/languages/fr_FR.json index 72849329..2596edab 100644 --- a/plugins/maintancemode/languages/fr_FR.json +++ b/plugins/maintancemode/languages/fr_FR.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "Mode de Maintenance", - "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" + "description": "Configurer votre site sur le mode de maintenance, vous pouvez accéder à la zone d'administration." }, "enable-maintence-mode": "Activer le mode de maintence", diff --git a/plugins/maintancemode/languages/zh_TW.json b/plugins/maintancemode/languages/zh_TW.json index 0df80e88..ce7d5ed8 100644 --- a/plugins/maintancemode/languages/zh_TW.json +++ b/plugins/maintancemode/languages/zh_TW.json @@ -2,14 +2,9 @@ "plugin-data": { "name": "維護模式", - "description": "設定您的網站為維護模式,但是您依然可以登入到管理介面", - "author": "Bludit", - "email": "", - "website": "http://www.bludit.com", - "version": "0.1", - "releaseDate": "2015-08-02" + "description": "設定您的網站為維護模式,但是您依然可以登入到管理介面" }, "enable-maintence-mode": "啟用維護模式", "message": "訊息" -} +} \ No newline at end of file diff --git a/plugins/opengraph/languages/de_DE.json b/plugins/opengraph/languages/de_DE.json index c4a68e41..937d2e79 100644 --- a/plugins/opengraph/languages/de_DE.json +++ b/plugins/opengraph/languages/de_DE.json @@ -2,11 +2,6 @@ "plugin-data": { "name": "Open Graph", - "description": "Plugin zur Verwendung des Open Graph Protocols.", - "author": "Bludit", - "email": "", - "website": "http://www.bludit.com", - "version": "0.1", - "releaseDate": "2015-09-25" + "description": "Plugin zur Verwendung des Open Graph Protocols." } -} +} \ No newline at end of file diff --git a/plugins/opengraph/languages/en_US.json b/plugins/opengraph/languages/en_US.json index c9d8afe3..2360859f 100644 --- a/plugins/opengraph/languages/en_US.json +++ b/plugins/opengraph/languages/en_US.json @@ -2,11 +2,6 @@ "plugin-data": { "name": "Open 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" + "description": "The Open Graph protocol enables any web page to become a rich object in a social graph." } } \ No newline at end of file diff --git a/plugins/opengraph/languages/es_AR.json b/plugins/opengraph/languages/es_AR.json index 1dd40da4..69fdb447 100644 --- a/plugins/opengraph/languages/es_AR.json +++ b/plugins/opengraph/languages/es_AR.json @@ -2,11 +2,6 @@ "plugin-data": { "name": "Open Graph", - "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" + "description": "El protocolo Open Graph sirve para publicar contenido en las redes sociales." } } \ No newline at end of file diff --git a/plugins/opengraph/languages/fr_FR.json b/plugins/opengraph/languages/fr_FR.json index f64eeb3b..adcade7d 100644 --- a/plugins/opengraph/languages/fr_FR.json +++ b/plugins/opengraph/languages/fr_FR.json @@ -2,11 +2,6 @@ "plugin-data": { "name": "Open Graph", - "description": "Permets à n’importe quelle page web de devenir l’objet enrichi d’un graphe social. Par exemple, il est utilisé sur Facebook pour permettre à une page web de bénéficier des mêmes fonctionnalités que n’importe quel autre objet sur Facebook.", - "author": "Bludit", - "email": "", - "website": "http://www.bludit.com", - "version": "0.1", - "releaseDate": "2015-08-02" + "description": "Permets à n’importe quelle page web de devenir l’objet enrichi d’un graphe social. Par exemple, il est utilisé sur Facebook pour permettre à une page web de bénéficier des mêmes fonctionnalités que n’importe quel autre objet sur Facebook." } } \ No newline at end of file diff --git a/plugins/opengraph/languages/zh_TW.json b/plugins/opengraph/languages/zh_TW.json index 394d068d..18122e8b 100644 --- a/plugins/opengraph/languages/zh_TW.json +++ b/plugins/opengraph/languages/zh_TW.json @@ -2,11 +2,6 @@ "plugin-data": { "name": "開放社交關係圖", - "description": "開放社交關係圖協定可以讓任何網頁變成豐富的物件", - "author": "Bludit", - "email": "", - "website": "http://www.bludit.com", - "version": "0.1", - "releaseDate": "2015-08-02" + "description": "開放社交關係圖協定可以讓任何網頁變成豐富的物件" } } diff --git a/plugins/pages/languages/de_DE.json b/plugins/pages/languages/de_DE.json index 9dd58d16..c699b09c 100644 --- a/plugins/pages/languages/de_DE.json +++ b/plugins/pages/languages/de_DE.json @@ -2,14 +2,9 @@ "plugin-data": { "name": "Liste aller Seiten", - "description": "Auflistung aller Seiten.", - "author": "Bludit", - "email": "", - "website": "http://www.bludit.com", - "version": "0.1", - "releaseDate": "2015-09-22" + "description": "Auflistung aller Seiten." }, "home": "Hauptseite", "show-home-link": "Hauptseite zeigen" -} +} \ No newline at end of file diff --git a/plugins/pages/languages/es_AR.json b/plugins/pages/languages/es_AR.json index 1a80bd31..6ee99a19 100644 --- a/plugins/pages/languages/es_AR.json +++ b/plugins/pages/languages/es_AR.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "Listado de páginas", - "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" + "description": "Muestra las paginas en orden según la posición." }, "home": "Página de inicio", diff --git a/plugins/pages/languages/fr_FR.json b/plugins/pages/languages/fr_FR.json index 2091b2ae..e74fe901 100644 --- a/plugins/pages/languages/fr_FR.json +++ b/plugins/pages/languages/fr_FR.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "Page navigation", - "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" + "description": "Constitue un menu avec les liens des pages dans la colonne du thème." }, "home": "Accueil", diff --git a/plugins/pages/languages/zh_TW.json b/plugins/pages/languages/zh_TW.json index c6c5fd59..7ee59e60 100644 --- a/plugins/pages/languages/zh_TW.json +++ b/plugins/pages/languages/zh_TW.json @@ -2,14 +2,9 @@ "plugin-data": { "name": "頁面列表", - "description": "顯示所有頁面的列表", - "author": "Bludit", - "email": "", - "website": "http://www.bludit.com", - "version": "0.1", - "releaseDate": "2015-08-02" + "description": "顯示所有頁面的列表" }, "home": "首頁", "show-home-link": "顯示首頁連結" -} +} \ No newline at end of file diff --git a/plugins/simplemde/languages/de_DE.json b/plugins/simplemde/languages/de_DE.json index 569b9de4..f13f8307 100644 --- a/plugins/simplemde/languages/de_DE.json +++ b/plugins/simplemde/languages/de_DE.json @@ -2,13 +2,8 @@ "plugin-data": { "name": "SimpleMDE", - "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" + "description": "Ein einfacher und schöner JavaScript-Editor für; Markdown von @WesCossick. Angepasst für Bludit von Diego Najar." }, "toolbar": "Werkzeugleiste", "tab-size": "Abstände der Tabstopps" -} +} \ No newline at end of file diff --git a/plugins/simplemde/languages/es_AR.json b/plugins/simplemde/languages/es_AR.json index a08763cd..f880b520 100644 --- a/plugins/simplemde/languages/es_AR.json +++ b/plugins/simplemde/languages/es_AR.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "SimpleMDE", - "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" + "description": "Simple, facil y hermoso editor Markdown desarrollado por @WesCossick. Adaptado por Diego Najar para Bludit." }, "toolbar": "Barra de herramientas", "tab-size": "Tamaño de la tabulación" diff --git a/plugins/simplemde/languages/fr_FR.json b/plugins/simplemde/languages/fr_FR.json index 6a797b07..ae8c299a 100644 --- a/plugins/simplemde/languages/fr_FR.json +++ b/plugins/simplemde/languages/fr_FR.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "SimpleMDE", - "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" + "description": "Un éditeur Markdown en JavaScript simple, beau, et intégrable." }, "toolbar": "Toolbar", "tab-size": "Tab size" diff --git a/plugins/tags/languages/de_DE.json b/plugins/tags/languages/de_DE.json index b2245c99..c07b69f4 100644 --- a/plugins/tags/languages/de_DE.json +++ b/plugins/tags/languages/de_DE.json @@ -2,11 +2,6 @@ "plugin-data": { "name": "Liste aller Schlagwörter", - "description": "Anzeige aller Schlagwörter.", - "author": "Bludit", - "email": "", - "website": "http://www.bludit.com", - "version": "0.1", - "releaseDate": "2015-09-25" + "description": "Anzeige aller Schlagwörter." } -} +} \ No newline at end of file diff --git a/plugins/tags/languages/fr_FR.json b/plugins/tags/languages/fr_FR.json index 63a52daf..36575d23 100644 --- a/plugins/tags/languages/fr_FR.json +++ b/plugins/tags/languages/fr_FR.json @@ -2,11 +2,6 @@ "plugin-data": { "name": "Liste de 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" + "description": "Affiche la lise de tous les mots clés." } } \ No newline at end of file