Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
54b023a4
Commit
54b023a4
authored
Aug 06, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Collector #2481: adjusted punctuation for link generation
(not working with ! inside quoted text)
parent
cf86a7c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
lib/python/StructuredText/DocumentClass.py
lib/python/StructuredText/DocumentClass.py
+3
-2
lib/python/StructuredText/STletters.py
lib/python/StructuredText/STletters.py
+2
-0
No files found.
lib/python/StructuredText/DocumentClass.py
View file @
54b023a4
...
...
@@ -86,7 +86,7 @@
import
re
,
ST
,
STDOM
from
string
import
split
,
join
,
replace
,
expandtabs
,
strip
,
find
,
rstrip
from
STletters
import
letters
,
digits
,
literal_punc
,
under_punc
,
\
strongem_punc
,
phrase_delimiters
strongem_punc
,
phrase_delimiters
,
dbl_quoted_punc
StringType
=
type
(
''
)
ListType
=
type
([])
...
...
@@ -950,9 +950,10 @@ class DocumentClass:
return None
## Some constants to make the doc_href() regex easier to read.
_DQUOTEDTEXT = r'("
[
%
s0
-
9
\
n
\
r
\
-
\
.
\
,
\
;
\
(
\
)
\
/
\
:
\
/
\
*
\
']+")'
%
letters
## double quoted text
_DQUOTEDTEXT = r'("
[
%
s0
-
9
\
n
\
r
%
s
]
+
")' % (letters,dbl_quoted_punc)
## double quoted text
_ABSOLUTE_URL=r'((http|https|ftp|mailto|file|about)[:/]+?[%s0-9_
\
@
\
.
\
,
\
?
\
!
\
/
\
:
\
;
\
-
\
#
\
~
\
=
\
&
\
%%]+)' % letters
_ABS_AND_RELATIVE_URL=r'([%s0-9_
\
@
\
.
\
,
\
?
\
!
\
/
\
:
\
;
\
-
\
#
\
~
\
=
\
&
\
%%]+)' % letters
_SPACES = r'(
\
s*)
'
def doc_href(self, s,
...
...
lib/python/StructuredText/STletters.py
View file @
54b023a4
...
...
@@ -18,6 +18,8 @@ def punc_func(exclude):
digits = string.digits
letters = string.letters
literal_punc = punc_func("'")
dbl_quoted_punc = punc_func("
\
""
)
strongem_punc
=
punc_func
(
'*'
)
under_punc
=
punc_func
(
'_'
)
phrase_delimiters
=
r'\
s
\.\
,
\?\
/
\!\
&
\(\
)
'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment