mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Change ... (periods) to … (ellipsis) in summary
Also update HTML output by running (after making sure to have the fr_FR.utf8 locale installed): ```sh LC_ALL=en_US.utf8 pelican -o pelican/tests/output/custom/ -s samples/pelican.conf.py samples/content/ LC_ALL=fr_FR.utf8 pelican -o pelican/tests/output/custom_locale/ -s samples/pelican.conf_FR.py samples/content/ LC_ALL=en_US.utf8 pelican -o pelican/tests/output/basic/ samples/content/ ``` as described at http://docs.getpelican.com/en/3.6.3/contribute.html#running-the-test-suite
This commit is contained in:
parent
14694c8357
commit
f864dd832c
10 changed files with 27 additions and 27 deletions
|
|
@ -531,12 +531,12 @@ class _HTMLWordTruncator(HTMLParser):
|
|||
self.handle_ref(six.unichr(codepoint))
|
||||
|
||||
|
||||
def truncate_html_words(s, num, end_text='...'):
|
||||
def truncate_html_words(s, num, end_text='…'):
|
||||
"""Truncates HTML to a certain number of words.
|
||||
|
||||
(not counting tags and comments). Closes opened tags if they were correctly
|
||||
closed in the given html. Takes an optional argument of what should be used
|
||||
to notify that the string has been truncated, defaulting to ellipsis (...).
|
||||
to notify that the string has been truncated, defaulting to ellipsis (…).
|
||||
|
||||
Newlines in the HTML are preserved. (From the django framework).
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue