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
c2990518
Commit
c2990518
authored
Nov 02, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in roman modifier for DT_InSV.
parent
5e69e0f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
lib/python/DocumentTemplate/DT_InSV.py
lib/python/DocumentTemplate/DT_InSV.py
+7
-3
No files found.
lib/python/DocumentTemplate/DT_InSV.py
View file @
c2990518
...
...
@@ -85,10 +85,10 @@
__doc__
=
'''Sequence variables support
$Id: DT_InSV.py,v 1.1
5 1999/10/28 17:08:36 petrilli
Exp $'''
__version__
=
'$Revision: 1.1
5
$'
[
11
:
-
2
]
$Id: DT_InSV.py,v 1.1
6 1999/11/02 16:51:32 brian
Exp $'''
__version__
=
'$Revision: 1.1
6
$'
[
11
:
-
2
]
from
string
import
lower
,
rfind
from
string
import
lower
,
rfind
,
split
,
join
from
math
import
sqrt
TupleType
=
type
(())
try
:
...
...
@@ -162,6 +162,7 @@ class sequence_variables:
roman
=
'%sI'
%
roman
# Replaces special cases in Roman Numerals
roman
=
sub
(
'DCCCC'
,
'CM'
,
roman
)
roman
=
sub
(
'CCCC'
,
'CD'
,
roman
)
roman
=
sub
(
'LXXXX'
,
'XC'
,
roman
)
...
...
@@ -403,6 +404,9 @@ class sequence_variables:
raise
KeyError
,
key
def
sub
(
s1
,
s2
,
src
):
return
join
(
split
(
src
,
s1
),
s2
)
def
opt
(
start
,
end
,
size
,
orphan
,
sequence
):
if
size
<
1
:
if
start
>
0
and
end
>
0
and
end
>=
start
:
...
...
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