File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 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) {
3333 return ( base . innerHTML ) ;
3434}
3535
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.
4236require ( [ "core/pubsubhub" ] , ( respecEvents ) => {
4337 "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.
4453 respecEvents . sub ( 'end' , ( message ) => {
4554 if ( message === 'core/link-to-dfn' ) {
4655 // all definitions are linked; find any internal references
You can’t perform that action at this time.
0 commit comments