mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-19 03:01:11 +01:00
Make hashtags at the end of bolded text render properly
Summary: Fixes T10096. The `**` was being parsed as part of the hashtag, so `**#asdf**` interpreted `#asdf**` as a hashtag. Test Plan: Unit test; bolded stuff with hashy contents. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10096 Differential Revision: https://secure.phabricator.com/D15006
This commit is contained in:
parent
b812a2171a
commit
d57c1d6ce2
2 changed files with 11 additions and 1 deletions
|
@ -32,7 +32,7 @@ final class ProjectRemarkupRule extends PhabricatorObjectRemarkupRule {
|
|||
// controlling and these names should parse correctly.
|
||||
|
||||
// These characters may never appear anywhere in a hashtag.
|
||||
$never = '\s?!,:;{}#\\(\\)"\'';
|
||||
$never = '\s?!,:;{}#\\(\\)"\'\\*/~';
|
||||
|
||||
// These characters may not appear at the edge of the string.
|
||||
$never_edge = '.';
|
||||
|
|
|
@ -125,6 +125,16 @@ final class ProjectRemarkupRuleTestCase extends PhabricatorTestCase {
|
|||
),
|
||||
),
|
||||
|
||||
'**#orbital**' => array(
|
||||
'embed' => array(),
|
||||
'ref' => array(
|
||||
array(
|
||||
'offset' => 3,
|
||||
'id' => 'orbital',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
foreach ($cases as $input => $expect) {
|
||||
|
|
Loading…
Reference in a new issue