Skip to content
This repository
Browse code

Corrected PHP Markdown Extra emphasis handling.

  • Loading branch information...
commit 8b6da4cea2887870719a4fb7bd840bacc11346a6 1 parent 071cf4a
Michel Fortin authored

Showing 1 changed file with 9 additions and 9 deletions. Show diff stats Hide diff stats

  1. +9 9 markdown.php
18 markdown.php
@@ -2588,19 +2588,19 @@ function _doFencedCodeBlocks_newlines($matches) {
2588 2588 # work in the middle of a word.
2589 2589 #
2590 2590 var $em_relist = array(
2591   - '' => '(?:(?<!\*)\*(?!\*)|(?<![a-zA-Z0-9_])_(?!_))(?=\S)(?![.,:;]\s)',
2592   - '*' => '(?<=\S)(?<!\*)\*(?!\*)',
2593   - '_' => '(?<=\S)(?<!_)_(?![a-zA-Z0-9_])',
  2591 + '' => '(?:(?<!\*)\*(?!\*)|(?<![a-zA-Z0-9_])_(?!_))(?=\S|$)(?![.,:;]\s)',
  2592 + '*' => '(?<=\S|^)(?<!\*)\*(?!\*)',
  2593 + '_' => '(?<=\S|^)(?<!_)_(?![a-zA-Z0-9_])',
2594 2594 );
2595 2595 var $strong_relist = array(
2596   - '' => '(?:(?<!\*)\*\*(?!\*)|(?<![a-zA-Z0-9_])__(?!_))(?=\S)(?![.,:;]\s)',
2597   - '**' => '(?<=\S)(?<!\*)\*\*(?!\*)',
2598   - '__' => '(?<=\S)(?<!_)__(?![a-zA-Z0-9_])',
  2596 + '' => '(?:(?<!\*)\*\*(?!\*)|(?<![a-zA-Z0-9_])__(?!_))(?=\S|$)(?![.,:;]\s)',
  2597 + '**' => '(?<=\S|^)(?<!\*)\*\*(?!\*)',
  2598 + '__' => '(?<=\S|^)(?<!_)__(?![a-zA-Z0-9_])',
2599 2599 );
2600 2600 var $em_strong_relist = array(
2601   - '' => '(?:(?<!\*)\*\*\*(?!\*)|(?<![a-zA-Z0-9_])___(?!_))(?=\S)(?![.,:;]\s)',
2602   - '***' => '(?<=\S)(?<!\*)\*\*\*(?!\*)',
2603   - '___' => '(?<=\S)(?<!_)___(?![a-zA-Z0-9_])',
  2601 + '' => '(?:(?<!\*)\*\*\*(?!\*)|(?<![a-zA-Z0-9_])___(?!_))(?=\S|$)(?![.,:;]\s)',
  2602 + '***' => '(?<=\S|^)(?<!\*)\*\*\*(?!\*)',
  2603 + '___' => '(?<=\S|^)(?<!_)___(?![a-zA-Z0-9_])',
2604 2604 );
2605 2605
2606 2606

0 comments on commit 8b6da4c

Please sign in to comment.
Something went wrong with that request. Please try again.