Plugin Directory

Changeset 2604810


Ignore:
Timestamp:
09/25/2021 11:36:17 AM (5 years ago)
Author:
manski
Message:

Updated BlogText to 0.9.10

Location:
blogtext/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • blogtext/trunk/admin/settings.php

    r2003725 r2604810  
    8181              'Specifies whether image captions that are specified directly in the Interlink (ie. as '
    8282              .'<code>[[image:myimage.jpg|My caption]]</code>) are displayed by default. If this is enabled, '
    83               .'a caption can be disabled by adding <code>nocaption</code> as parameter. If this is disabled '
    84               .'the caption will only be shown when the user moves the mouse cursor over the image - unless'
     83              .'a caption can be disabled by adding <code>nocaption</code> as a parameter. If this is disabled '
     84              .'the caption will only be shown when the user moves the mouse cursor over the image - unless '
    8585              .'the parameter <code>caption</code> is added to the Interlink.');
    8686    }
     
    103103      if (isset($content_width) && $content_width > 0) {
    104104        $desc_short = $content_width.' pixel';
    105         $desc_long = 'The theme specifies its content width with '.$content_width.' pixel. Unless you want '
     105        $desc_long = 'The current theme specifies its content width as '.$content_width.' pixel. Unless you want '
    106106                   . 'another content width, you can set this option to zero (0).';
    107107      } else {
     
    115115              .'is used to limit the width of images used in posts and pages. If this is 0, the theme is '
    116116              .'checked whether it specifies the width in the global variable <code>$content_width</code>. '
    117               .'If this variable isn\'t available, the image widths won\' be constrained.'
     117              .'If this variable isn\'t available, the image widths won\'t be constrained.'
    118118              .'<br/><br/>'
    119119              .$desc_long,
  • blogtext/trunk/blogtext.php

    r2004620 r2604810  
    22/*
    33Plugin Name: BlogText for WordPress
    4 Plugin URI: http://wordpress.org/extend/plugins/blogtext/
     4Plugin URI: https://blogtext.mayastudios.com/
    55Description: Allows you to write your posts and pages with an alternative, easy-to-learn, and fast-to-type syntax
    6 Version: 0.9.9
     6Version: 0.9.10
    77Author: Sebastian Krysmanski
    8 Author URI: http://mayastudios.com
     8Author URI: https://manski.net
    99*/
    10 
    11 #########################################################################################
    12 #
    13 # Copyright 2010-2018  Maya Studios (http://www.mayastudios.com)
    14 #
    15 # This program is free software: you can redistribute it and/or modify
    16 # it under the terms of the GNU General Public License as published by
    17 # the Free Software Foundation, either version 3 of the License, or
    18 # (at your option) any later version.
    19 #
    20 # This program is distributed in the hope that it will be useful,
    21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    23 # GNU General Public License for more details.
    24 #
    25 # You should have received a copy of the GNU General Public License
    26 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    27 #
    28 #########################################################################################
    29 
     10# ^-- https://developer.wordpress.org/plugins/the-basics/header-requirements/
    3011
    3112require_once(dirname(__FILE__).'/api/commons.php');
  • blogtext/trunk/markup/blogtext_markup.php

    r2004620 r2604810  
    2727    // * "(?:" : non-capturing subpattern (http://www.php.net/manual/en/regexp.reference.subpatterns.php)
    2828    // * "(?<=", "(?<!", "(?=", "(?!" : Assertions (http://www.php.net/manual/en/regexp.reference.assertions.php)
    29     // * "+?", "*?" : ungreedy versions of "+" and "*" (http://www.php.net/manual/en/regexp.reference.repetition.php)
     29    // * "+?", "*?" : non-greedy versions of "+" and "*" (http://www.php.net/manual/en/regexp.reference.repetition.php)
    3030    // * "(?R)" : recursion
    3131    // * Modifiers: http://php.net/manual/de/reference.pcre.pattern.modifiers.php
     
    4343
    4444        // BlogText short codes using the [[ ]] syntax
    45         // NOTE: We don't use just single brackets (ie. [ ]) as this is already use by Wordpress' Shortcode API
     45        // NOTE: We don't use just single brackets (i.e. [ ]) as this is already use by WordPress' Shortcode API
    4646        // NOTE: Must run AFTER "headings" and BEFORE the tables, as the tables also use pipes
    4747        // NOTE: Must work with [[...\]]] (resulting in "...\]" being the content
     
    7676
    7777        // simple tables - Creole syntax
    78         // NOTE: Need to be done AFTER "complex_tables" as they syntaxes otherwise may collide (eg. on the
     78        // NOTE: Need to be done AFTER "complex_tables" as the syntaxes otherwise may collide (e.g. on the
    7979        //   table caption)
    8080        'simple_table' =>
     
    8282            '/\n(\|(?!\+)[^|]+\|.+(?:\n\|(?!\+)[^|]+\|.+)*)(?:\n\|\+(.+))?/',
    8383
    84         // Ordered (#) and unordered (*) lists; definition list(;)
     84        // Ordered (#) and unordered (*) lists; definition list (;)
    8585        // NOTE: The user can't start a list with "**" (list with sublist).
    86         // NOTE: Indentations in lists must be done with at least two spaces/tabs. Otherwise it's too easy to accidentally
     86        // NOTE: Indentations in lists must be done with at least two spaces/tabs. Otherwise, it's too easy to accidentally
    8787        //   insert a space and thereby add a line to a list. This also "fixes" the problem of having a more-link directly
    8888        //   after a list being placed inside the list.
     
    155155  /**
    156156   * This array contains the amount each id has occurred in this posting. This is used to alter ids (by
    157    * appending a number) so that the remain unique. Eg. this will result in "my_id", "my_id_2", "my_id_3", ...
     157   * appending a number) so that they remain unique. E.g. this will result in "my_id", "my_id_2", "my_id_3", ...
    158158   */
    159159  private $id_suffix = array();
     
    183183    //
    184184
    185     // Handles regular links to post (ie. without prefix), as well as attachment and WordPress links (such
     185    // Handles regular links to post (i.e. without prefix), as well as attachment and WordPress links (such
    186186    // as categories, tags, blogroll, and archive).
    187187    self::register_interlink_handler(self::$interlinks, new WordpressLinkShortCodeHandler());
     
    262262    $ret = $this->unmaskAllTextSections($ret);
    263263
    264     // Remove line breaks from the start and end to prevent Wordpress from adding unnecessary paragraphs
     264    // Remove line breaks from the start and end to prevent WordPress from adding unnecessary paragraphs
    265265    // and line breaks.
    266266    return trim($ret);
     
    269269  /**
    270270   * Clears the page cache completely or only for the specified post.
    271    * @param int|null $post  if this is "null", the whole cache will be cleared. Otherwise only the cache for
     271   * @param int|null $post  if this is "null", the whole cache will be cleared. Otherwise, only the cache for
    272272   *   the specified post/page id will be cleared.
    273273   */
     
    14691469      $row = new ATM_TableRow();
    14701470
    1471       foreach (explode('|', $row_code) as $cell_code) {
     1471      foreach (explode('|', substr($row_code, 1)) as $cell_code) {
    14721472        // NOTE: DON'T trim the cell code here as we need to differentiate between "|= text" and "| =text".
    1473         if (empty($cell_code)) {
     1473        if ($cell_code === "") {
    14741474          // can only be happening on the last element - still we need to add it so that we can remove the
    14751475          // last element below in a secure way
     
    14771477        } else {
    14781478          if ($cell_code[0] == '=') {
    1479             $row->cells[] = new ATM_TableCell(ATM_TableCell::TYPE_TH, trim(substr($cell_code, 1)));
     1479            $row->cells[] = new ATM_TableCell(ATM_TableCell::TYPE_TH, substr($cell_code, 1));
    14801480          } else {
    1481             $row->cells[] = new ATM_TableCell(ATM_TableCell::TYPE_TD, trim($cell_code));
     1481            $row->cells[] = new ATM_TableCell(ATM_TableCell::TYPE_TD, $cell_code);
    14821482          }
    14831483        }
    14841484
    14851485        $last_cell = $row->cells[count($row->cells) - 1];
    1486         if (empty($last_cell->cell_content) && $last_cell->cell_type == ATM_TableCell::TYPE_TD) {
     1486        if ($last_cell->isEmpty() && $last_cell->cell_type == ATM_TableCell::TYPE_TD) {
    14871487          // Remove the last cell, if it's empty. This is the result of "| my cell |" (which would otherwise
    14881488          // result in two cells).
  • blogtext/trunk/markup/table_base.php

    r2003725 r2604810  
    1010  public function __construct($cell_type, $cell_content) {
    1111    $this->cell_type = $cell_type;
    12     $this->cell_content = $cell_content;
     12    $this->cell_content = trim(strval($cell_content));
     13  }
     14
     15  public function isEmpty() {
     16    return $this->cell_content === "";
    1317  }
    1418}
  • blogtext/trunk/readme.txt

    r2004620 r2604810  
    11=== BlogText ===
     2Stable tag: 0.9.10
    23Contributors: manski
    34Tags: formatting, markup, post
    4 Requires at least: 3.0.0
    5 Tested up to: 5.0.2
    6 Stable tag: 0.9.9
    75Requires PHP: 5.6
    86License: GPLv3 or later
    97License URI: https://www.gnu.org/licenses/gpl-3.0.html
     8Requires at least: 3.0.0
     9Tested up to: 5.8.1
    1010
    1111BlogText is a plugin for WordPress that adds a simple wiki-like syntax to WordPress and enriches it with a good Wordpress editor integration.
     
    4545== Changelog ==
    4646
     47= 0.9.10 =
     48* Fixed some bugs (issues #29, #35, #36)
     49* Updated NPM packages to fix a security vulnerability
     50
    4751= 0.9.9 =
    4852* Change: Removed all custom thumbnail creation code. Instead, BlogText now just uses the actual image - with appropriate `max-width` styling. For reasoning, see issue #22.
     
    5256* Fix: Quotes in Interlinks now work properly
    5357* Fix: `%%` can now be used in code blocks (issue #21)
    54 * Fix: A single `]` is now supported in shortcodes (issues #17)
     58* Fix: A single `]` is now supported in shortcodes (issue #17)
    5559
    5660= 0.9.8 =
  • blogtext/trunk/style/blogtext-default.css

    r2004620 r2604810  
    1 div.error pre.stack-trace .func-name,p.table-caption{font-weight:700}dd p.no-margin,dt p.no-margin,li p.no-margin{margin-bottom:0!important}span.strike{text-decoration:line-through}span.underline{text-decoration:underline}p.table-caption{text-align:center;font-size:80%;margin-top:-20px}p.indented{padding-left:2em}.align-left{float:left;clear:left;margin:0 10px 10px 0!important}.align-right{float:right;clear:right;margin:0 0 10px 10px!important}.align-center{margin:0 auto 1em!important;text-align:center}.align-center>.image-caption{text-align:left}div.image-frame .image-caption{margin:0;padding:.05em .5em .3em;font-size:85%;line-height:120%;color:#999;font-style:italic;text-align:center}.toc{max-width:60%;border:1px solid #AAA;background-color:#F9F9F9;padding:.7em 1.7em;margin:1.5em;font-size:80%}.toc .toc-title{font-size:1.2em;border-bottom:1px solid #ccc;margin-bottom:.5em}.toc .toc-toggle{font-size:75%;text-decoration:none;display:block;float:right;margin-left:5px}.toc ul,.toc ul li{margin-left:0}.toc ul{list-style-type:none;list-style-image:none;margin-bottom:0!important;padding-left:0;text-align:left}.toc ul ul{margin:0 0 0 1.5em!important}a.heading-link:link,a.heading-link:visited{color:#D7D7D7;text-decoration:none}*>a.heading-link:link,*>a.heading-link:visited{visibility:hidden}h1:hover a.heading-link,h2:hover a.heading-link,h3:hover a.heading-link,h4:hover a.heading-link,h5:hover a.heading-link,h6:hover a.heading-link{visibility:visible}.code,pre{white-space:pre;padding:5px;margin-bottom:24px;overflow-x:auto;font-family:Monaco,Consolas,"Lucidia Console","Lucidia Sans Typewriter","Courier New",Courier,monospace;font-size:9pt;line-height:1.2em}.code table{table-layout:auto}.code table pre{overflow:visible}div.code-linenum{white-space:normal}.code table,.code td,.code td pre,.code tr{margin:0!important;padding:0!important;background:0 0!important;border-width:0!important}.code td{vertical-align:baseline}.code td.ln{padding-right:4px!important;width:0;overflow-x:visible}.code td.de1{padding-left:6px!important;width:100%}.error{-moz-border-radius:3px;background-color:#FFEBE8;border:1px solid #C00;padding:0 .6em}div.error{margin:5px 15px 2px}div.error p,div.error pre.stack-trace{line-height:1.2!important;margin:.5em 0!important;padding:2px!important;font-size:12px!important}div.error pre.stack-trace{background-color:#FFEBE8;overflow-x:scroll}
     1dd p.no-margin,dt p.no-margin,li p.no-margin{margin-bottom:0!important}span.strike{text-decoration:line-through}span.underline{text-decoration:underline}p.table-caption{text-align:center;font-size:80%;font-weight:700;margin-top:-20px}p.indented{padding-left:2em}.align-left{float:left;clear:left;margin:0 10px 10px 0!important}.align-right{float:right;clear:right;margin:0 0 10px 10px!important}.align-center{margin:0 auto 1em auto!important;text-align:center}.align-center>.image-caption{text-align:left}div.image-frame .image-caption{margin:0;padding:.05em .5em .3em .5em;font-size:85%;line-height:120%;color:#999;font-style:italic;text-align:center}.toc{max-width:60%;border:1px solid #aaa;background-color:#f9f9f9;padding:.7em 1.7em;margin:1.5em;font-size:80%}.toc .toc-title{font-size:1.2em;border-bottom:1px solid #ccc;margin-bottom:.5em}.toc .toc-toggle{font-size:75%;text-decoration:none;display:block;float:right;margin-left:5px}.toc ul{list-style-type:none;list-style-image:none;margin-left:0;margin-bottom:0!important;padding-left:0;text-align:left}.toc ul li{margin-left:0}.toc ul ul{margin:0 0 0 1.5em!important}a.heading-link:link,a.heading-link:visited{color:#d7d7d7;text-decoration:none}*>a.heading-link:link,*>a.heading-link:visited{visibility:hidden}h1:hover a.heading-link,h2:hover a.heading-link,h3:hover a.heading-link,h4:hover a.heading-link,h5:hover a.heading-link,h6:hover a.heading-link{visibility:visible}.code,pre{white-space:pre;padding:5px;margin-bottom:24px;overflow-x:auto;font-family:Monaco,Consolas,"Lucidia Console","Lucidia Sans Typewriter","Courier New",Courier,monospace;font-size:9pt;line-height:1.2em}.code table{table-layout:auto}.code table pre{overflow:visible}div.code-linenum{white-space:normal}.code table,.code td,.code td pre,.code tr{margin:0!important;padding:0!important;background:0 0!important;border-width:0!important}.code td{vertical-align:baseline}.code td.ln{padding-right:4px!important;width:0;overflow-x:visible}.code td.de1{padding-left:6px!important;width:100%}.error{-moz-border-radius:3px 3px 3px 3px;background-color:#ffebe8;border:1px solid #c00;padding:0 .6em}div.error{margin:5px 15px 2px}div.error p,div.error pre.stack-trace{line-height:1.2!important;margin:.5em 0!important;padding:2px!important;font-size:12px!important}div.error pre.stack-trace{background-color:#ffebe8;overflow-x:scroll}div.error pre.stack-trace .func-name{font-weight:700}
Note: See TracChangeset for help on using the changeset viewer.