pelican/pelican
Scott Colby 4c36dafaf6 Fix SUMMARY_MAX_PARAGRAPHS with SUMMARY_MAX_LENGTH
When, for example, the content is 2 paragraphs, each consisting of 30
words, and SUMMARY_MAX_PARAGRAPHS=1 and SUMMARY_MAX_LENGTH=50, the
current behavior produces a summary with 50 words and 2 paragraphs,
effectively ignoring SUMMARY_MAX_PARAGRAPHS.

This change inverts this behavior: the resulting summary from the above
situation will consist of the entire first 30 word paragraph.

In the case where the first paragraph(s) is longer than
SUMMARY_MAX_LENGTH, the summary will still be truncated to that length.

This change brings the actual behavior in line with the documented
behavior.
2024-11-23 13:06:56 +01:00
..
plugins The ruff and ruff-format fixes 2024-05-30 09:08:16 -05:00
tests Fix SUMMARY_MAX_PARAGRAPHS with SUMMARY_MAX_LENGTH 2024-11-23 13:06:56 +01:00
themes chore: update URLs of GitHub Ribbons 2024-06-19 19:11:41 +02:00
tools pre-commit autoupdate and fix new issues pointed out by ruff 2024-11-03 13:32:32 -06:00
__init__.py Don't store a RichHandler object in the argparse namespace (#3394) 2024-09-20 18:49:23 +02:00
__main__.py The ruff and ruff-format fixes 2024-05-30 09:08:16 -05:00
cache.py Apply code style to project via: ruff format . 2023-10-29 22:18:29 +01:00
contents.py Fix SUMMARY_MAX_PARAGRAPHS with SUMMARY_MAX_LENGTH 2024-11-23 13:06:56 +01:00
generators.py Clarify _include_path() parameter docstring 2024-10-02 19:08:26 +02:00
log.py Choose logging handler via --log-handler CLI option (#3293) 2024-05-30 17:13:27 +02:00
paginator.py Fixes in files for ruff T201, RUF001, PLR2004, B904, SLOT000, PYI024, PIE800 2024-05-31 10:41:24 -05:00
readers.py Add disabled status for #3304 (#3305) 2024-09-12 13:28:51 +02:00
rstdirectives.py More ruff fixes in files: stop ignoring C408, UP007, PLR5501, B006 2024-05-30 13:21:12 -05:00
server.py Fixes in files for ruff T201, RUF001, PLR2004, B904, SLOT000, PYI024, PIE800 2024-05-31 10:41:24 -05:00
settings.py Rename default branch to main 2024-06-25 11:33:28 +02:00
signals.py Apply code style to project via: ruff format . 2023-10-29 22:18:29 +01:00
urlwrappers.py More ruff fixes in files: stop ignoring C408, UP007, PLR5501, B006 2024-05-30 13:21:12 -05:00
utils.py Introduce paragraph count summary (#2761) 2024-06-25 15:07:41 +02:00
writers.py ruff UP031 in files: use format specifiers instead of percent format 2024-06-01 16:00:17 -05:00