Skip to content

Commit 65eead6

Browse files
committed
fix: convertSubNameWrapper lost its comment
1 parent 92c4086 commit 65eead6

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

collection-export/strict-mods.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -591,17 +591,6 @@ export function convertNamePartDate(doc) {
591591
return doc
592592
}
593593

594-
/**
595-
* Fix nonstandard mods/name/subNameWrapper elements, several operations:
596-
* - affiliation -> name/affiliation ("CCAC")
597-
* - constituent -> append to affiliation affiliation ("CCAC Faculty")
598-
* - department -> name/affiliation ("MFA Design")
599-
* - gradDate -> append to department affiliation ("MFA Design 2020")
600-
* - description -> name/description ("Sinel was the father of modern industrial design.")
601-
*
602-
* @param {Document} doc - XML DOM document
603-
* @returns {Document} Modified document
604-
*/
605594
/**
606595
* Convert part/detail elements that indicate speaker release forms
607596
* Mudflats collection uses part/detail with "yes"/"no" values to indicate
@@ -675,7 +664,7 @@ export function wrapCopyInformation(doc) {
675664
/**
676665
* Reorder children of copyInformation to match MODS schema sequence
677666
* Schema order: form, subLocation, shelfLocator, electronicLocator, note, enumerationAndChronology, itemIdentifier
678-
*
667+
*
679668
* @param {Document} doc - XML DOM document
680669
* @returns {Document} Modified document
681670
*/
@@ -690,7 +679,7 @@ export function reorderCopyInformationChildren(doc) {
690679
for (let copyInfo of copyInfoElements) {
691680
// Get all children
692681
const children = Array.from(copyInfo.childNodes).filter(node => node.nodeType === 1) // Element nodes only
693-
682+
694683
// Sort children by the schema order
695684
children.sort((a, b) => {
696685
const aIndex = correctOrder.indexOf(a.tagName)
@@ -715,6 +704,17 @@ export function reorderCopyInformationChildren(doc) {
715704
return doc
716705
}
717706

707+
/**
708+
* Fix nonstandard mods/name/subNameWrapper elements, several operations:
709+
* - affiliation -> name/affiliation ("CCAC")
710+
* - constituent -> append to affiliation affiliation ("CCAC Faculty")
711+
* - department -> name/affiliation ("MFA Design")
712+
* - gradDate -> append to department affiliation ("MFA Design 2020")
713+
* - description -> name/description ("Sinel was the father of modern industrial design.")
714+
*
715+
* @param {Document} doc - XML DOM document
716+
* @returns {Document} Modified document
717+
*/
718718
export function convertSubNameWrapper(doc) {
719719
if (!doc) {
720720
return doc

0 commit comments

Comments
 (0)