mirror of
https://git.ari.lt/ari.lt/blog.ari.lt.git
synced 2025-02-04 09:39:25 +01:00
update @ Sun 25 Dec 04:12:35 EET 2022
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
bba0da5bee
commit
680f0adad9
2 changed files with 8 additions and 4 deletions
File diff suppressed because one or more lines are too long
|
@ -248,10 +248,7 @@ def sanitise_title(title: str, titleset: Iterable[str], _nosep: bool = False) ->
|
||||||
|
|
||||||
|
|
||||||
def truncate_str(string: str, length: int) -> str:
|
def truncate_str(string: str, length: int) -> str:
|
||||||
if len(string) <= length:
|
return string if len(string) <= length else (string[:length] + "...")
|
||||||
return string
|
|
||||||
|
|
||||||
return string[:length] + "..."
|
|
||||||
|
|
||||||
|
|
||||||
class BetterHeaders(Treeprocessor):
|
class BetterHeaders(Treeprocessor):
|
||||||
|
|
Loading…
Add table
Reference in a new issue