Skip to content

Commit

Permalink
Merge pull request #928 from WolframResearch/bugfix/454270
Browse files Browse the repository at this point in the history
Avoid `RegularExpression::maxrec` by using `StringFormatQ["...", "XML"]` instead of pattern matching
  • Loading branch information
rhennigan authored Nov 15, 2024
2 parents b81161b + 1c864d1 commit 8f41264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Chatbook/SendChat.wl
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ extractBodyData // endDefinition;
parseXMLResponse // beginDefinition;

parseXMLResponse[ response_String ] :=
If[ StringContainsQ[ response, "<" ~~ __ ~~ ">" ~~ ___ ~~ "</" ~~ ___ ~~ ">" ],
If[ StringFormatQ[ response, "XML" ],
parseXMLResponse[ Quiet @ ImportString[ response, "XML" ] ],
$Failed
];
Expand Down

0 comments on commit 8f41264

Please sign in to comment.