Skip to content

Commit

Permalink
Avoid RegularExpression::maxrec by using `StringFormatQ["...", "XML…
Browse files Browse the repository at this point in the history
…"]` instead of pattern matching
  • Loading branch information
rhennigan committed Nov 15, 2024
1 parent b81161b commit 1c864d1
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 1c864d1

Please sign in to comment.