-
Notifications
You must be signed in to change notification settings - Fork 749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: Use manual disambiguators for shared filenames #763
Conversation
This could break manual guessing for custom lexers, though the impact is minor - lexers using the old interface will have their |
But! This should give us a clearer way forward when languages share conflicting file extensions. |
4d6955f
to
75c5071
Compare
Okay, we're green now. |
👏 Things are getting simpler! |
(you are welcome to merge this as you like - there may be some minor backcompat issues, so i'll leave it to you to decide how to handle versioning and such) |
Merged! Will bump the major version of rouge for the next release. |
This PR removes the use of
analyze_text
's numeric score interface, and adds a facility for specifying manual disambiguating cases.analyze_text
has been renamed todetect?
, which returns a boolean, and is only meant to detect unambiguous cases (like shebangs and doctype declarations).