mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Add unicode support for strong/em regex.
This commit is contained in:
parent
215ff63594
commit
55f360a591
@ -1068,23 +1068,23 @@ class Parsedown
|
||||
# Read-only
|
||||
|
||||
private static $strong_regex = array(
|
||||
'*' => '/^[*]{2}([^*]+?)[*]{2}(?![*])/s',
|
||||
'_' => '/^__([^_]+?)__(?!_)/s',
|
||||
'*' => '/^[*]{2}([^*]+?)[*]{2}(?![*])/us',
|
||||
'_' => '/^__([^_]+?)__(?!_)/us',
|
||||
);
|
||||
|
||||
private static $em_regex = array(
|
||||
'*' => '/^[*]([^*]+?)[*](?![*])/s',
|
||||
'_' => '/^_([^_]+?)[_](?![_])\b/s',
|
||||
'*' => '/^[*]([^*]+?)[*](?![*])/us',
|
||||
'_' => '/^_([^_]+?)[_](?![_])\b/us',
|
||||
);
|
||||
|
||||
private static $strong_em_regex = array(
|
||||
'*' => '/^[*]{2}(.*?)[*](.+?)[*](.*?)[*]{2}/s',
|
||||
'_' => '/^__(.*?)_(.+?)_(.*?)__/s',
|
||||
'*' => '/^[*]{2}(.*?)[*](.+?)[*](.*?)[*]{2}/us',
|
||||
'_' => '/^__(.*?)_(.+?)_(.*?)__/us',
|
||||
);
|
||||
|
||||
private static $em_strong_regex = array(
|
||||
'*' => '/^[*](.*?)[*]{2}(.+?)[*]{2}(.*?)[*]/s',
|
||||
'_' => '/^_(.*?)__(.+?)__(.*?)_/s',
|
||||
'*' => '/^[*](.*?)[*]{2}(.+?)[*]{2}(.*?)[*]/us',
|
||||
'_' => '/^_(.*?)__(.+?)__(.*?)_/us',
|
||||
);
|
||||
|
||||
private static $special_characters = array(
|
||||
|
Loading…
Reference in New Issue
Block a user