File tree Expand file tree Collapse file tree
src/lib/lexicon/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9999 )
100100 .reduce ((p , c ) => p + c , ' ' );
101101
102- const match = href ?.match (/ E-(\d + )/ );
102+ const match = href ?.match (/ ^ E-(\d + )$ / );
103103 if (match ) {
104104 const index = parseInt (match [1 ], 10 );
105105 const wordObject = vernacularWords .value .find ((item ) => item .id === index );
108108
109109 dataAttributes = ` data-word="${word }" data-index="${index }" data-homonym="${homonymIndex }" ` ;
110110 }
111- return ` <span class="clickable cursor-pointer"${dataAttributes }>${linkText }</span> ` ;
111+ if (match || href ?.startsWith (' #' )) {
112+ return ` <span class="clickable cursor-pointer"${dataAttributes }>${linkText }</span> ` ;
113+ } else {
114+ return createElementString (el , parentContainsSenseNumber || isSenseNumber );
115+ }
112116 } else if (el .tagName === ' audio-link' && el .hasAttribute (' src' )) {
113117 // Handle audio-link tag - create audio element and clickable link
114118 const audioFile = el .getAttribute (' src' );
You can’t perform that action at this time.
0 commit comments