-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix: abstract limit #268
Fix: abstract limit #268
Conversation
What made me start this change were two logic bugs: chars_count being checked against -1 (instead of None) and abstract_delimiter taking higher priority than unlimited chars_count. Apart from fixing the above, this commit reorders the if-elif chain according to priority and, in the documentation, mentions how abstract_chars_count and abstract_delimiter interact. Breaking changes, as far as i'm aware: - abstract_chars_count == -1 is again highest-priority, - more effort (using abstract_delimiter) before non-compliance, - chars_count is now an inclusive setting, increasing the article length before it has to be shortened by one character. None of these changes conflicts with the pre-existing documentation and none should be noticeable in a well-configured environment.
The description of abstract_delimiter was obviously wrong, copy-pasted from abstract_chars_count. Fortunately, even if someone didn't notice this, setting it to a numeric value erred out, therefore nobody can have such a working configuration and there's no need to complicate things trying to accept numbers. The best we can do is document the present behaviour. In order to make the interaction of these two settings clear, describe the full mechanism at once and refer to it from the other place.
One thing not entirely obvious from the changes is that tests/fixtures/docs/page_without_meta_early_delimiter.md together with test_simple_build_item_length_unlimited() checks the priority of abstract_chars_count: -1 versus abstract_delimiter.
2cafc3c
to
e78ec88
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #268 +/- ##
==========================================
+ Coverage 84.22% 84.68% +0.45%
==========================================
Files 10 10
Lines 558 555 -3
Branches 119 117 -2
==========================================
Hits 470 470
+ Misses 56 54 -2
+ Partials 32 31 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: Y.D.X. <[email protected]> Signed-off-by: Julien <[email protected]>
Patches sent by mail by @tiosgz. Applied with
git am
. It's my very first time in this kind of git email workflow. Pfiu !.Command used:
Supersedes #202
cc @craigbox @YDX-2147483647