File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed
src/infrastructure/markup Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ final class PhabricatorMarkupEngine {
41
41
42
42
private $ objects = array ();
43
43
private $ viewer ;
44
- private $ version = 1 ;
44
+ private $ version = 2 ;
45
45
46
46
47
47
/* -( Markup Pipeline )---------------------------------------------------- */
Original file line number Diff line number Diff line change @@ -27,14 +27,19 @@ public function markupDocumentLink($matches) {
27
27
$ slug = PhrictionDocument::getSlugURI ($ slug );
28
28
$ href = (string ) id (new PhutilURI ($ slug ))->setFragment ($ fragment );
29
29
30
- return $ this ->getEngine ()->storeText (
31
- phutil_render_tag (
32
- 'a ' ,
33
- array (
34
- 'href ' => $ href ,
35
- 'class ' => 'phriction-link ' ,
36
- ),
37
- phutil_escape_html ($ name )));
30
+ if ($ this ->getEngine ()->getState ('toc ' )) {
31
+ $ text = phutil_escape_html ($ name );
32
+ } else {
33
+ $ text = phutil_render_tag (
34
+ 'a ' ,
35
+ array (
36
+ 'href ' => $ href ,
37
+ 'class ' => 'phriction-link ' ,
38
+ ),
39
+ phutil_escape_html ($ name ));
40
+ }
41
+
42
+ return $ this ->getEngine ()->storeText ($ text );
38
43
}
39
44
40
45
}
You can’t perform that action at this time.
0 commit comments