Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9213b7a9
Commit
9213b7a9
authored
Sep 27, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-write <ulink> elements as described in the conversion spec.
parent
5a28bfbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
Doc/tools/sgmlconv/docfixer.py
Doc/tools/sgmlconv/docfixer.py
+19
-0
No files found.
Doc/tools/sgmlconv/docfixer.py
View file @
9213b7a9
...
@@ -810,6 +810,24 @@ def add_node_ids(fragment, counter=0):
...
@@ -810,6 +810,24 @@ def add_node_ids(fragment, counter=0):
return
counter
+
1
return
counter
+
1
def
fixup_ulink
(
doc
,
fragment
):
for
ulink
in
find_all_elements
(
fragment
,
"ulink"
):
children
=
ulink
.
childNodes
assert
len
(
children
)
==
2
text
=
children
[
0
]
href
=
children
[
1
]
href
.
normalize
()
assert
len
(
href
.
childNodes
)
==
1
assert
href
.
childNodes
[
0
].
nodeType
==
TEXT
url
=
href
.
childNodes
[
0
].
data
ulink
.
setAttribute
(
"href"
,
url
)
ulink
.
removeChild
(
href
)
content
=
text
.
childNodes
while
len
(
content
):
ulink
.
appendChild
(
content
[
0
])
ulink
.
removeChild
(
text
)
REFMODINDEX_ELEMENTS
=
(
'refmodindex'
,
'refbimodindex'
,
REFMODINDEX_ELEMENTS
=
(
'refmodindex'
,
'refbimodindex'
,
'refexmodindex'
,
'refstmodindex'
)
'refexmodindex'
,
'refstmodindex'
)
...
@@ -976,6 +994,7 @@ def convert(ifp, ofp):
...
@@ -976,6 +994,7 @@ def convert(ifp, ofp):
fixup_table_structures
(
doc
,
fragment
)
fixup_table_structures
(
doc
,
fragment
)
fixup_rfc_references
(
doc
,
fragment
)
fixup_rfc_references
(
doc
,
fragment
)
fixup_signatures
(
doc
,
fragment
)
fixup_signatures
(
doc
,
fragment
)
fixup_ulink
(
doc
,
fragment
)
add_node_ids
(
fragment
)
add_node_ids
(
fragment
)
fixup_refmodindexes
(
fragment
)
fixup_refmodindexes
(
fragment
)
fixup_bifuncindexes
(
fragment
)
fixup_bifuncindexes
(
fragment
)
...
...
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