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
977f3261
Commit
977f3261
authored
Apr 27, 2001
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some re's
parent
90099db1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
lib/python/DocumentTemplate/DT_String.py
lib/python/DocumentTemplate/DT_String.py
+4
-4
lib/python/DocumentTemplate/DT_Var.py
lib/python/DocumentTemplate/DT_Var.py
+4
-4
No files found.
lib/python/DocumentTemplate/DT_String.py
View file @
977f3261
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
# attributions are listed in the accompanying credits file.
# attributions are listed in the accompanying credits file.
#
#
##############################################################################
##############################################################################
"$Id: DT_String.py,v 1.4
1 2001/04/27 20:27:39
shane Exp $"
"$Id: DT_String.py,v 1.4
2 2001/04/27 20:59:34
shane Exp $"
from
string
import
split
,
strip
from
string
import
split
,
strip
import
thread
,
re
import
thread
,
re
...
@@ -158,10 +158,10 @@ class String:
...
@@ -158,10 +158,10 @@ class String:
r'%('
# beginning
r'%('
# beginning
'(?P<name>[a-zA-Z0-9_/.-]+)'
# tag name
'(?P<name>[a-zA-Z0-9_/.-]+)'
# tag name
'('
'('
'[
\
0
- ]+'
# space after tag name
'[
\
0
00
- ]+'
# space after tag name
'(?P<args>([^)"]+("[^"]*")?
\
)*)
'
# arguments
'(?P<args>([^)"]+("[^"]*")?)*)'
# arguments
')?'
')?'
'
)(
?
P
<
fmt
>
[
0
-
9
]
*
[.]
?
[
0
-
9
]
*
[
a
-
z
]
\
|
[]
!
[])
' # end
')(?P<fmt>[0-9]*[.]?[0-9]*[a-z]|[]![])'
# end
,
re
.
I
)
,
re
.
I
)
_parseTag__roles__
=
()
_parseTag__roles__
=
()
...
...
lib/python/DocumentTemplate/DT_Var.py
View file @
977f3261
...
@@ -217,8 +217,8 @@ Evaluating expressions without rendering results
...
@@ -217,8 +217,8 @@ Evaluating expressions without rendering results
'''
# '
'''
# '
__rcs_id__
=
'$Id: DT_Var.py,v 1.
39 2001/04/27 20:27:39
shane Exp $'
__rcs_id__
=
'$Id: DT_Var.py,v 1.
40 2001/04/27 20:59:34
shane Exp $'
__version__
=
'$Revision: 1.
39
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
40
$'
[
11
:
-
2
]
from
DT_Util
import
parse_params
,
name_param
,
str
from
DT_Util
import
parse_params
,
name_param
,
str
import
re
,
string
,
sys
import
re
,
string
,
sys
...
@@ -378,7 +378,7 @@ def dollars_and_cents(v, name='(Unknown name)', md={}):
...
@@ -378,7 +378,7 @@ def dollars_and_cents(v, name='(Unknown name)', md={}):
def
thousands_commas
(
v
,
name
=
'(Unknown name)'
,
md
=
{},
def
thousands_commas
(
v
,
name
=
'(Unknown name)'
,
md
=
{},
thou
=
re
.
compile
(
thou
=
re
.
compile
(
r"([0-9])([0-9][0-9][0-9]([,.]
\
|$))
").search):
r"([0-9])([0-9][0-9][0-9]([,.]|$))"
).
search
):
v
=
str
(
v
)
v
=
str
(
v
)
vl
=
split
(
v
,
'.'
)
vl
=
split
(
v
,
'.'
)
if
not
vl
:
return
v
if
not
vl
:
return
v
...
@@ -390,7 +390,7 @@ def thousands_commas(v, name='(Unknown name)', md={},
...
@@ -390,7 +390,7 @@ def thousands_commas(v, name='(Unknown name)', md={},
while
mo
is
not
None
:
while
mo
is
not
None
:
l
=
mo
.
start
(
0
)
l
=
mo
.
start
(
0
)
v
=
v
[:
l
+
1
]
+
','
+
v
[
l
+
1
:]
v
=
v
[:
l
+
1
]
+
','
+
v
[
l
+
1
:]
l
=thou(v)
mo
=
thou
(
v
)
return
v
+
s
return
v
+
s
def
whole_dollars_with_commas
(
v
,
name
=
'(Unknown name)'
,
md
=
{}):
def
whole_dollars_with_commas
(
v
,
name
=
'(Unknown name)'
,
md
=
{}):
...
...
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