lib/jsdoc/transform-apijson-for-sdk.js
function (oSymbol, bCalledOnConstructor) {
			var bHeaderDocuLinkFound = false,
				bUXGuidelinesLinkFound = false,
				aReferences = [],
				entity = bCalledOnConstructor? oSymbol.constructor.references : oSymbol.references;

			const UX_GUIDELINES_BASE_URL = "https://experience.sap.com/fiori-design-web/";

			if (entity && entity.length > 0) {
				entity.forEach(function (sReference) {
					var aParts;

					// Docu link - For the header we take into account only the first link that matches one of the patterns
					if (!bHeaderDocuLinkFound) {

						// Handled patterns:
						// * topic:59a0e11712e84a648bb990a1dba76bc7
						// * {@link topic:59a0e11712e84a648bb990a1dba76bc7}
						// * {@link topic:59a0e11712e84a648bb990a1dba76bc7 Link text}
						aParts = sReference.match(/^{@link\s+topic:(\w{32})(\s.+)?}$|^topic:(\w{32})$/);

						if (aParts) {
							if (aParts[3]) {
								// Link is of type topic:GUID
								oSymbol.docuLink = aParts[3];
								oSymbol.docuLinkText = oSymbol.basename;
							} else if (aParts[1]) {
								// Link of type {@link topic:GUID} or {@link topic:GUID Link text}
								oSymbol.docuLink = aParts[1];
								oSymbol.docuLinkText = aParts[2] ? aParts[2] : oSymbol.basename;
							}
							bHeaderDocuLinkFound = true;
							return;
						}
					}

					// Fiori link - Handled patterns:
					// * fiori:flexible-column-layout
					// * fiori:/flexible-column-layout/
					// * fiori:https://experience.sap.com/fiori-design-web/flexible-column-layout/
					// * {@link fiori:flexible-column-layout}
					// * {@link fiori:/flexible-column-layout/}
					// * {@link fiori:/flexible-column-layout/ Flexible Column Layout}
					// * {@link fiori:https://experience.sap.com/fiori-design-web/flexible-column-layout/}
					// * {@link fiori:https://experience.sap.com/fiori-design-web/flexible-column-layout/ Flexible Column Layout}
					aParts = sReference.match(/^(?:{@link\s)?fiori:(?:https:\/\/experience\.sap\.com\/fiori-design-web\/)?\/?(\S+\b)\/?\s?(.*[^\s}])?}?$/);

					if (aParts) {
						let [, sTarget, sTargetName] = aParts;

						if (bCalledOnConstructor && !bUXGuidelinesLinkFound) {
							// Extract first found UX Guidelines link as primary
							oSymbol.uxGuidelinesLink = UX_GUIDELINES_BASE_URL + sTarget;
							oSymbol.uxGuidelinesLinkText = sTargetName ? sTargetName : oSymbol.basename;
								bUXGuidelinesLinkFound = true;
								return;
						} else {
							// BCP: 1870155880 - Every consecutive "fiori:" link should be handled as a normal link
							sReference = "{@link " + UX_GUIDELINES_BASE_URL + sTarget + (sTargetName ? " " + sTargetName : "") + "}";
						}
					}

					aReferences.push(sReference);
				});
				bCalledOnConstructor? oSymbol.constructor.references = aReferences : oSymbol.references = aReferences;
			} else {
				bCalledOnConstructor? oSymbol.constructor.references = [] : oSymbol.references = [];
			}
		}
function (oSymbol, bCalledOnConstructor) {
			var bHeaderDocuLinkFound = false,
				bUXGuidelinesLinkFound = false,
				aReferences = [],
				entity = bCalledOnConstructor? oSymbol.constructor.references : oSymbol.references;

			const UX_GUIDELINES_BASE_URL = "https://experience.sap.com/fiori-design-web/";

			if (entity && entity.length > 0) {
				entity.forEach(function (sReference) {
					var aParts;

					// Docu link - For the header we take into account only the first link that matches one of the patterns
					if (!bHeaderDocuLinkFound) {

						// Handled patterns:
						// * topic:59a0e11712e84a648bb990a1dba76bc7
						// * {@link topic:59a0e11712e84a648bb990a1dba76bc7}
						// * {@link topic:59a0e11712e84a648bb990a1dba76bc7 Link text}
						aParts = sReference.match(/^{@link\s+topic:(\w{32})(\s.+)?}$|^topic:(\w{32})$/);

						if (aParts) {
							if (aParts[3]) {
								// Link is of type topic:GUID
								oSymbol.docuLink = aParts[3];
								oSymbol.docuLinkText = oSymbol.basename;
							} else if (aParts[1]) {
								// Link of type {@link topic:GUID} or {@link topic:GUID Link text}
								oSymbol.docuLink = aParts[1];
								oSymbol.docuLinkText = aParts[2] ? aParts[2] : oSymbol.basename;
							}
							bHeaderDocuLinkFound = true;
							return;
						}
					}

					// Fiori link - Handled patterns:
					// * fiori:flexible-column-layout
					// * fiori:/flexible-column-layout/
					// * fiori:https://experience.sap.com/fiori-design-web/flexible-column-layout/
					// * {@link fiori:flexible-column-layout}
					// * {@link fiori:/flexible-column-layout/}
					// * {@link fiori:/flexible-column-layout/ Flexible Column Layout}
					// * {@link fiori:https://experience.sap.com/fiori-design-web/flexible-column-layout/}
					// * {@link fiori:https://experience.sap.com/fiori-design-web/flexible-column-layout/ Flexible Column Layout}
					aParts = sReference.match(/^(?:{@link\s)?fiori:(?:https:\/\/experience\.sap\.com\/fiori-design-web\/)?\/?(\S+\b)\/?\s?(.*[^\s}])?}?$/);

					if (aParts) {
						let [, sTarget, sTargetName] = aParts;

						if (bCalledOnConstructor && !bUXGuidelinesLinkFound) {
							// Extract first found UX Guidelines link as primary
							oSymbol.uxGuidelinesLink = UX_GUIDELINES_BASE_URL + sTarget;
							oSymbol.uxGuidelinesLinkText = sTargetName ? sTargetName : oSymbol.basename;
								bUXGuidelinesLinkFound = true;
								return;
						} else {
							// BCP: 1870155880 - Every consecutive "fiori:" link should be handled as a normal link
							sReference = "{@link " + UX_GUIDELINES_BASE_URL + sTarget + (sTargetName ? " " + sTargetName : "") + "}";
						}
					}

					aReferences.push(sReference);
				});
				bCalledOnConstructor? oSymbol.constructor.references = aReferences : oSymbol.references = aReferences;
			} else {
				bCalledOnConstructor? oSymbol.constructor.references = [] : oSymbol.references = [];
			}
		}
function ( oSymbol , bCalledOnConstructor ) { var bHeaderDocuLinkFound = false , bUXGuidelinesLinkFound = false , aReferences = [ ] , entity = bCalledOnConstructor ? oSymbol . constructor . references : oSymbol . references ; const UX_GUIDELINES_BASE_URL = "https://experience.sap.com/fiori-design-web/" ; if ( entity && entity . length > 0 ) { entity . forEach ( function ( sReference ) { var aParts ; // Docu link - For the header we take into account only the first link that matches one of the patterns if ( ! bHeaderDocuLinkFound ) { // Handled patterns: // * topic:59a0e11712e84a648bb990a1dba76bc7 // * {@link topic:59a0e11712e84a648bb990a1dba76bc7} // * {@link topic:59a0e11712e84a648bb990a1dba76bc7 Link text} aParts = sReference . match ( / ^{@link\s+topic:(\w{32})(\s.+)?}$|^topic:(\w{32})$ / ) ; if ( aParts ) { if ( aParts [ 3 ] ) { // Link is of type topic:GUID oSymbol . docuLink = aParts [ 3 ] ; oSymbol . docuLinkText = oSymbol . basename ; } else if ( aParts [ 1 ] ) { // Link of type {@link topic:GUID} or {@link topic:GUID Link text} oSymbol . docuLink = aParts [ 1 ] ; oSymbol . docuLinkText = aParts [ 2 ] ? aParts [ 2 ] : oSymbol . basename ; } bHeaderDocuLinkFound = true ; return ; } } // Fiori link - Handled patterns: // * fiori:flexible-column-layout // * fiori:/flexible-column-layout/ // * fiori:https://experience.sap.com/fiori-design-web/flexible-column-layout/ // * {@link fiori:flexible-column-layout} // * {@link fiori:/flexible-column-layout/} // * {@link fiori:/flexible-column-layout/ Flexible Column Layout} // * {@link fiori:https://experience.sap.com/fiori-design-web/flexible-column-layout/} // * {@link fiori:https://experience.sap.com/fiori-design-web/flexible-column-layout/ Flexible Column Layout} aParts = sReference . match ( / ^(?:{@link\s)?fiori:(?:https:\/\/experience\.sap\.com\/fiori-design-web\/)?\/?(\S+\b)\/?\s?(.*[^\s}])?}?$ / ) ; if ( aParts ) { let [ , sTarget , sTargetName ] = aParts ; if ( bCalledOnConstructor && ! bUXGuidelinesLinkFound ) { // Extract first found UX Guidelines link as primary oSymbol . uxGuidelinesLink = UX_GUIDELINES_BASE_URL + sTarget ; oSymbol . uxGuidelinesLinkText = sTargetName ? sTargetName : oSymbol . basename ; bUXGuidelinesLinkFound = true ; return ; } else { // BCP: 1870155880 - Every consecutive "fiori:" link should be handled as a normal link sReference = "{@link " + UX_GUIDELINES_BASE_URL + sTarget + ( sTargetName ? " " + sTargetName : "" ) + "}" ; } } aReferences . push ( sReference ) ; } ) ; bCalledOnConstructor ? oSymbol . constructor . references = aReferences : oSymbol . references = aReferences ; } else { bCalledOnConstructor ? oSymbol . constructor . references = [ ] : oSymbol . references = [ ] ; } }
Pre-process and modify references
@param {object} oSymbol control data object which will be modified
@private
Pre - process and modify references