@@ -50,6 +50,7 @@ export function setup(helper) {
5050 '^p(?:ackage)?:(.+)$' : { 
5151 class : 'ref-package' , 
5252 url : m  =>  `https://docs.doomemacs.org/-/package/#/${ m [ 1 ] }  ` , 
53+  text : m  =>  m [ 1 ] 
5354 } , 
5455 '^:([a-zA-Z0-9-_]+)(?: ([a-zA-Z0-9-_]+))(?: \+([a-zA-Z0-9-_]+))?$' : { 
5556 class : 'ref-module' , 
@@ -58,18 +59,22 @@ export function setup(helper) {
5859 const  url  =  `${ category }  /${ module }  `  +  ( flag  ? `/#/description/module-flags/${ flag }  `  : "" ) ; 
5960 return  `https://docs.doomemacs.org/latest/modules/${ url }  ` ; 
6061 } , 
62+  text : m  =>  m [ 0 ] 
6163 } , 
6264 '^fn:(.+)$' : { 
6365 class : 'ref-fn' , 
6466 url : m  =>  `https://docs.doomemacs.org/-/function/${ m [ 1 ] }  ` , 
67+  text : m  =>  m [ 1 ] 
6568 } , 
6669 '^var:(.+)$' : { 
6770 class : 'ref-var' , 
6871 url : m  =>  `https://docs.doomemacs.org/-/var/${ m [ 1 ] }  ` , 
72+  text : m  =>  m [ 1 ] 
6973 } , 
7074 '^face:(.+)$' : { 
7175 class : 'ref-face' , 
7276 url : m  =>  `https://docs.doomemacs.org/-/face/${ m [ 1 ] }  ` , 
77+  text : m  =>  m [ 1 ] 
7378 } , 
7479 '^(?:(?:([^/ ]+)/)?([^# ]+))?#([0-9]+)$' : { 
7580 class : 'ref-issue' , 
@@ -79,6 +84,7 @@ export function setup(helper) {
7984 repo  =  m [ 2 ]  ||  repo ; 
8085 return  `https://github.com/${ user }  /${ repo }  /issues/${ m [ 3 ] }  ` ; 
8186 } , 
87+  text : m  =>  m [ 0 ] 
8288 } 
8389 } ; 
8490 md . core . textPostProcess . ruler . push ( 'references' ,  { 
@@ -88,9 +94,11 @@ export function setup(helper) {
8894 Object . keys ( refTypes ) . find ( re  =>  { 
8995 let  m  =  matches [ 1 ] . match ( new  RegExp ( re ) ) ; 
9096 if  ( m )  { 
97+  let  type  =  refTypes [ re ] ; 
9198 result  =  { 
92-  class : refTypes [ re ] . class , 
93-  url : refTypes [ re ] . url ( m ) 
99+  class : type . class , 
100+  url : type . url ( m ) , 
101+  text : type . text 
94102 } ; 
95103 return  true ; 
96104 } 
@@ -101,7 +109,7 @@ export function setup(helper) {
101109 buffer . push ( token ) ; 
102110
103111 token  =  new  state . Token ( 'text' ,  '' ,  0 ) ; 
104-  token . content  =  matches [ 1 ] ; 
112+  token . content  =  result . text ; 
105113 buffer . push ( token ) ; 
106114
107115 token  =  new  state . Token ( 'link_close' ,  'a' ,  - 1 ) ; 
0 commit comments