Plugin Directory

Changeset 2927096


Ignore:
Timestamp:
06/16/2023 02:19:31 PM (3 years ago)
Author:
Supertext
Message:

Sync with GitHub

Location:
polylang-supertext/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • polylang-supertext/trunk/plugin.php

    r2921539 r2927096  
    77Domain Path: /resources/languages
    88Author: Supertext AG
    9 Version: 4.18
     9Version: 4.19
    1010Author URI: http://www.supertext.ch
    1111License: GPLv2 or later
    1212*/
    1313
    14 define('SUPERTEXT_PLUGIN_VERSION', '4.18');
     14define('SUPERTEXT_PLUGIN_VERSION', '4.19');
    1515define('SUPERTEXT_PLUGIN_REVISION', 48);
    1616define('SUPERTEXT_BASE_PATH', __DIR__);
  • polylang-supertext/trunk/readme.txt

    r2921539 r2927096  
    109109
    110110== Changelog ==
     111= 4.19 =
     112* Exclude shortcode replacement in html comments
    111113
    112114= 4.18 =
  • polylang-supertext/trunk/src/Supertext/Helper/TextProcessor.php

    r2857633 r2927096  
    116116
    117117  /**
    118    * Returns positions in the content where shortcodes should not be replaced. In this case the positions of Gutenberg block attributes.
     118   * Returns positions in the content where shortcodes should not be replaced. In this case the positions of Gutenberg block attributes or shortcodes in comments.
    119119   */
    120120  private function getExcludedPositions($content)
     
    122122    $excludedPositions = array();
    123123
    124     if (preg_match_all('/<!-- wp:.*-->/', $content, $matches, PREG_OFFSET_CAPTURE)) {
     124    if (preg_match_all('/<!-- (wp:.*)|(\[[^\]]+\]([^\[]+\[[^\]]+\])?)(\s+)?-->/', $content, $matches, PREG_OFFSET_CAPTURE)) {
    125125      foreach ($matches[0] as $match) {
    126126        $excludedPositions[] = array('start' => $match[1], 'end' => $match[1] + strlen($match[0]));
Note: See TracChangeset for help on using the changeset viewer.