1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-18 18:51:12 +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:
epriestley 2016-01-12 09:27:00 -08:00
parent b812a2171a
commit d57c1d6ce2
2 changed files with 11 additions and 1 deletions

View file

@ -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 = '.';

View file

@ -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) {