paginar 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -9118,7 +9118,7 @@ function applyReferences(contentRaw) {
|
|
|
9118
9118
|
if (!content) return content
|
|
9119
9119
|
|
|
9120
9120
|
if (content.includes(reference.cit)) {
|
|
9121
|
-
|
|
9121
|
+
const regex = new RegExp(reference.cit, 'g');
|
|
9122
9122
|
const newContent = content.replace(
|
|
9123
9123
|
regex,
|
|
9124
9124
|
`<span class='reference' data-ref='${reference.cit}'>${reference.cit}</span>`
|
|
@@ -9136,10 +9136,12 @@ function listenToReferencesClick(contentWrapper) {
|
|
|
9136
9136
|
}
|
|
9137
9137
|
|
|
9138
9138
|
function getClickedReferenceData(event) {
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9139
|
+
console.log(event.target.classList);
|
|
9140
|
+
if (event.target.classList.value.includes('reference')) {
|
|
9141
|
+
const ref = state$4.references.find(item => item.cit === event.target.innerText);
|
|
9142
|
+
if (ref) {
|
|
9143
|
+
state$4.reference = ref;
|
|
9144
|
+
}
|
|
9143
9145
|
}
|
|
9144
9146
|
}
|
|
9145
9147
|
|