File tree 1 file changed +15
-6
lines changed
1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,23 @@ function restrictReferences(utils, content) {
33
33
return ( base . innerHTML ) ;
34
34
}
35
35
36
- // add a handler to come in after all the definitions are resolved
37
- //
38
- // New logic: If the reference is within a 'dl' element of
39
- // class 'termlist', and if the target of that reference is
40
- // also within a 'dl' element of class 'termlist', then
41
- // consider it an internal reference and ignore it.
42
36
require ( [ "core/pubsubhub" ] , ( respecEvents ) => {
43
37
"use strict" ;
38
+
39
+ // remote data-cite on where the citation is to ourselves.
40
+ respecEvents . sub ( 'end' , ( message ) => {
41
+ const selfDfns = document . querySelectorAll ( "dfn[data-cite^='" + respecConfig . shortName . toUpperCase ( ) + "']" ) ;
42
+ for ( const dfn of selfDfns ) {
43
+ delete dfn . dataset . cite ;
44
+ }
45
+ } ) ;
46
+
47
+ // add a handler to come in after all the definitions are resolved
48
+ //
49
+ // New logic: If the reference is within a 'dl' element of
50
+ // class 'termlist', and if the target of that reference is
51
+ // also within a 'dl' element of class 'termlist', then
52
+ // consider it an internal reference and ignore it.
44
53
respecEvents . sub ( 'end' , ( message ) => {
45
54
if ( message === 'core/link-to-dfn' ) {
46
55
// all definitions are linked; find any internal references
You can’t perform that action at this time.
0 commit comments