Changed definition retrieval to match respec
authorShane McCarron <halindrome@gmail.com>
Thu, 16 Jul 2015 10:49:12 -0500
changeset 818 d34e61c45933
parent 817 09b6969c9bbd
Changed definition retrieval to match respec

ReSpec's method for managing definition titles changed, so
we need to change with it!
latest/common/script/resolveReferences.js
--- a/latest/common/script/resolveReferences.js	Thu Jul 16 00:54:13 2015 -0400
+++ b/latest/common/script/resolveReferences.js	Thu Jul 16 10:49:12 2015 -0500
@@ -58,8 +58,8 @@
     // strategy: Traverse the content finding all of the terms defined
     $.each(base.querySelectorAll("dfn"), function(i, item) {
         var $t = $(item) ;
-        var title = $t.dfnTitle();
-        var n = $t.makeID("dfn", title);
+        var titles = $t.getDfnTitles();
+        var n = $t.makeID("dfn", titles[0]);
         if (n) {
             termNames[n] = $t.parent() ;
         }
@@ -81,12 +81,14 @@
             Object.keys(termNames).forEach(function(term) {
                 var $p = $("#"+term) ;
                 if ($p) {
-                    var t = $p.dfnTitle();
+                    var tList = $p.getDfnTitles();
                     $p.parent().next().remove();
                     $p.remove() ;
-                    if (respecConfig.definitionMap[t]) {
-                        delete respecConfig.definitionMap[t];
-                    }
+                    tList.forEach(function( item ) {
+                        if (respecConfig.definitionMap[item]) {
+                            delete respecConfig.definitionMap[item];
+                        }
+                    });
                 }
             });
         }