fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d3dfd4b
)
woblink description limit change
author
Radek Czajka
<rczajka@rczajka.pl>
Fri, 18 Aug 2023 11:37:48 +0000
(13:37 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Fri, 18 Aug 2023 11:37:48 +0000
(13:37 +0200)
src/depot/publishers/woblink.py
patch
|
blob
|
history
diff --git
a/src/depot/publishers/woblink.py
b/src/depot/publishers/woblink.py
index
96971c2
..
cb64a15
100644
(file)
--- a/
src/depot/publishers/woblink.py
+++ b/
src/depot/publishers/woblink.py
@@
-249,17
+249,17
@@
class Woblink(BasePublisher):
def get_abstract(self, wldoc, errors=None, description_add=None):
description = self.get_description(wldoc, description_add)
parts = description.split('\n', 1)
def get_abstract(self, wldoc, errors=None, description_add=None):
description = self.get_description(wldoc, description_add)
parts = description.split('\n', 1)
- if len(parts) == 1 or len(parts[0]) > 2
0
0:
+ if len(parts) == 1 or len(parts[0]) > 2
4
0:
# No newline found here.
# Try to find last sentence end..
# No newline found here.
# Try to find last sentence end..
- parts = re.split(r' \.', description[2
0
0::-1], 1)
+ parts = re.split(r' \.', description[2
4
0::-1], 1)
if len(parts) == 2:
p1 = parts[1][::-1] + '.'
p2 = description[len(p1) + 1:]
else:
# No sentence end found.
# Just find a space.
if len(parts) == 2:
p1 = parts[1][::-1] + '.'
p2 = description[len(p1) + 1:]
else:
# No sentence end found.
# Just find a space.
- p1 = description[:2
0
0].rsplit(' ', 1)[0]
+ p1 = description[:2
4
0].rsplit(' ', 1)[0]
p2 = description[len(p1) + 1:]
p1 += '…'
p2 = '…' + p2
p2 = description[len(p1) + 1:]
p1 += '…'
p2 = '…' + p2