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
ca6d08c5
Commit
ca6d08c5
authored
Dec 12, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added level as argument for html_with_references.
parent
ee039e32
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lib/python/StructuredText/StructuredText.py
lib/python/StructuredText/StructuredText.py
+6
-3
No files found.
lib/python/StructuredText/StructuredText.py
View file @
ca6d08c5
...
...
@@ -46,7 +46,7 @@ Special symbology is used to indicate special constructs:
first '**' and whitespace or puctuation to the right of the second '**')
is made strong.
$Id: StructuredText.py,v 1.
6 1997/12/12 15:27:25
jim Exp $'''
$Id: StructuredText.py,v 1.
7 1997/12/12 15:39:54
jim Exp $'''
# Copyright
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...
...
@@ -98,6 +98,9 @@ $Id: StructuredText.py,v 1.6 1997/12/12 15:27:25 jim Exp $'''
# (540) 371-6909
#
# $Log: StructuredText.py,v $
# Revision 1.7 1997/12/12 15:39:54 jim
# Added level as argument for html_with_references.
#
# Revision 1.6 1997/12/12 15:27:25 jim
# Added additional pattern matching for HTML references.
#
...
...
@@ -362,7 +365,7 @@ def html_quote(v,
text
=
gsub
(
re
,
name
,
text
)
return
text
def
html_with_references
(
text
):
def
html_with_references
(
text
,
level
=
1
):
text
=
gsub
(
'[
\
0
\
n
]..
\
[
\
([-_0-9_a-zA-Z-]+
\
)
\
]'
,
'
\
n
<a name="
\
\
1">[
\
\
1]</a>'
,
...
...
@@ -378,7 +381,7 @@ def html_with_references(text):
'
\\
1
<
a
href
=
"
\
\
2.html"
>
[
\\
2
]
</
a
>
\\
3
',
text)
return HTML(text,level=
1
)
return HTML(text,level=
level
)
def main():
...
...
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