Skip to content

Commit

Permalink
deal with HYPERLINK field codes that somehow lost their HYPERLINK tok…
Browse files Browse the repository at this point in the history
  • Loading branch information
gimsieke committed Jun 30, 2023
1 parent b91bbd7 commit fd41a95
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xsl/join-runs.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@
<xsl:attribute name="docx2hub:field-function-args" select="replace($instr-text-string,'”','&#34;')"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="prelim" as="attribute()+">
<xsl:variable name="prelim" as="attribute()*">
<xsl:analyze-string select="$instr-text-string" regex="^\s*\\?(\i\c*)[\s\p{{Zs}}]*">
<xsl:matching-substring>
<xsl:attribute name="docx2hub:field-function-name" select="upper-case(regex-group(1))">
Expand Down Expand Up @@ -1244,6 +1244,9 @@
</xsl:analyze-string>
</xsl:variable>
<xsl:choose>
<xsl:when test="count($prelim) = 0">
<xsl:message select="'EMPTY $instr-text-string ATTRs for these $instr-text-nodes: ', $instr-text-nodes"></xsl:message>
</xsl:when>
<xsl:when test="count($prelim) = 1 and not(matches($prelim[1], '^\i\c*$'))">
<xsl:attribute name="docx2hub:field-function-name" select="'BROKEN2'"/>
<xsl:attribute name="docx2hub:field-function-error"
Expand Down

0 comments on commit fd41a95

Please sign in to comment.