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
70555e6c
Commit
70555e6c
authored
Jun 20, 2002
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #432: STX special characters inside a literal were not
printed properly
parent
28e6af93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
lib/python/StructuredText/DocumentClass.py
lib/python/StructuredText/DocumentClass.py
+1
-1
lib/python/StructuredText/tests/testStructuredText.py
lib/python/StructuredText/tests/testStructuredText.py
+16
-8
No files found.
lib/python/StructuredText/DocumentClass.py
View file @
70555e6c
...
...
@@ -294,6 +294,7 @@ class DocumentClass:
#'doc_named_link',
#'doc_underline'
text_types
=
[
'doc_literal'
,
'doc_sgml'
,
'doc_inner_link'
,
'doc_named_link'
,
...
...
@@ -301,7 +302,6 @@ class DocumentClass:
'doc_href2'
,
'doc_strong'
,
'doc_emphasize'
,
'doc_literal'
,
'doc_underline'
,
'doc_sgml'
,
'doc_xref'
,
...
...
lib/python/StructuredText/tests/testStructuredText.py
View file @
70555e6c
...
...
@@ -140,50 +140,58 @@ class BasicTests(unittest.TestCase):
def
testUnderline
(
self
):
"""underline"""
self
.
_test
(
"xx _this is html_ xx"
,
"xx <u>this is html</u> xx"
)
def
testUnderline1
(
self
):
"""underline 1"""
self
.
_test
(
"xx _this is html_"
,
"<u>this is html</u>"
)
def
testEmphasis
(
self
):
""" emphasis """
self
.
_test
(
"xx *this is html* xx"
,
"xx <em>this is html</em> xx"
)
def
testStrong
(
self
):
""" strong """
self
.
_test
(
"xx **this is html** xx"
,
"xx <strong>this is html</strong> xx"
)
def
testUnderlineThroughoutTags
(
self
):
"""Underlined text containing tags should not be transformed"""
self
.
_test
(
'<a href="index_html">index_html</a>'
,
'<a href="index_html">index_html</a>'
)
def
testUnderscoresInLiteral1
(
self
):
""" underscores in literals shouldn't do underlining (1)"""
self
.
_test
(
"def __init__(self)"
,
"def __init__(self)"
)
def
testUnderscoresInLiteral2
(
self
):
""" underscores in literals shouldn't do underlining (2)"""
self
.
_test
(
"this is '__a_literal__' eh"
,
"<code>__a_literal__</code>"
)
def
testUnderlinesWithoutWithspaces
(
self
):
""" underscores in literals shouldn't do underlining (3)"""
self
.
_test
(
"Zopes structured_text is sometimes a night_mare"
,
"Zopes structured_text is sometimes a night_mare"
)
def
testAsterisksInLiteral
(
self
):
self
.
_test
(
"this is a '*literal*' eh"
,
"<code>*literal*</code>"
)
def
testDoubleAsterisksInLiteral
(
self
):
self
.
_test
(
"this is a '**literal**' eh"
,
"<code>**literal**</code>"
)
def
testLinkInLiteral
(
self
):
self
.
_test
(
"this is a '
\
"
literal
\
"
:http://www.zope.org/.' eh"
,
'<code>"literal":http://www.zope.org/.</code>'
)
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
StructuredTextTests
)
)
...
...
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