Skip to content

Conversation

@gandarez
Copy link
Contributor

@gandarez gandarez commented Aug 23, 2023

This PR improves the regexes analysers in XML by adding the single attribute and changing how regex nodes are implemented. Some analysers break in the first match where others sum all scores and return, the single attribute when true returns the score for the first match. The regex order matters.

<analyse single="true" >
      <regex pattern="(?m)^\s*#include &lt;" score="0.1" />
      <regex pattern="(?m)^\s*#ifn?def " score="0.1" />
</analyse>

Ref #828

@alecthomas
Copy link
Owner

Nice, thanks!

@alecthomas alecthomas merged commit 708662a into alecthomas:master Aug 23, 2023
@gandarez
Copy link
Contributor Author

Thanks for merging it. Any plan to release it soon?

@gandarez gandarez deleted the feature/xml-analyser branch August 23, 2023 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants