[ 
https://issues.apache.org/jira/browse/TIKA-4968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18125865#comment-18125865
 ] 

ASF GitHub Bot commented on TIKA-4968:
--------------------------------------

Copilot commented on code in PR #3318:
URL: https://github.com/apache/tika/pull/3318#discussion_r4238331398


##########
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/ooxml/FormattingTagManager.java:
##########
@@ -178,18 +179,44 @@ void applyFormatting(RunProperties runProperties) throws 
SAXException {
         }
     }
 
+    /**
+     * Opens {@code <span class="math">} for an OMML equation. A hyperlink 
change inside
+     * the equation closes it.

Review Comment:
   Closing math on a hyperlink transition drops the `math` marker for the rest 
of the same equation. `closeInlineTags()` clears `isMath`, while 
`OOXMLWordAndPowerPointTextHandler` calls `startMath()` only on the outer 
`oMath` start, so runs after a hyperlink starts or ends are emitted outside any 
math span. Keep logical equation state separate from the currently open span 
and reopen the span around hyperlink transitions (or make math the outer 
wrapper), then cover this interaction in the regression test.





> Add span class=math for equations in docx
> -----------------------------------------
>
>                 Key: TIKA-4968
>                 URL: https://issues.apache.org/jira/browse/TIKA-4968
>             Project: Tika
>          Issue Type: Task
>            Reporter: Tim Allison
>            Priority: Trivial
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to