Skip to content

Commit

Permalink
TRAVIS-CI update from aria-common
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-n-cooper committed Apr 23, 2019
1 parent cac5fe0 commit d991750
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions common/script/resolveReferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ function updateReferences(base) {
}

// We should be able to remove terms that are not actually
// referenced from the common definitions
// referenced from the common definitions. This array is
// indexed with the element ids of the dfn tags to be pruned.
var termNames = [] ;

function restrictReferences(utils, content) {
Expand All @@ -224,7 +225,8 @@ function restrictReferences(utils, content) {
// New logic: If the reference is within a 'dl' element of
// class 'termlist', and if the target of that reference is
// also within a 'dl' element of class 'termlist', then
// consider it an internal reference and ignore it.
// consider it an internal reference and ignore it -- assuming
// it is not part of another included term.

require(["core/pubsubhub"], function(respecEvents) {
"use strict";
Expand All @@ -236,8 +238,14 @@ require(["core/pubsubhub"], function(respecEvents) {
var t = $item.attr('href');
if ( $item.closest('dl.termlist').length ) {
if ( $(t).closest('dl.termlist').length ) {
// do nothing
return;
// Figure out the id of the glossary term which holds this
// internal reference and see if it will be pruned (i.e.
// is in the termNames array). If it is, we can ignore
// this particular internal reference.
var dfn = $item.closest('dd').prev().find('dfn');
var parentTermId = dfn.makeID('dfn', dfn.getDfnTitles[0]);
if (termNames[parentTermId])
return;
}
}
var r = t.replace(/^#/,"") ;
Expand Down

0 comments on commit d991750

Please sign in to comment.