# HG changeset patch
# User cmlenz
# Date 1151344440 0
# Node ID 5a4d4570331996b9c13cf7077c81106acb35e67a
# Parent d88358f719fa45d729fea3bcf4920897e1aff2d8
Cosmetic (mostly whitespace) changes.
diff --git a/markup/__init__.py b/markup/__init__.py
--- a/markup/__init__.py
+++ b/markup/__init__.py
@@ -50,7 +50,6 @@
>>> doc = tag.doc(tag.title('My document'), lang='en')
>>> doc.generate().render(method='html')
'My document'
-
"""
from markup.core import *
diff --git a/markup/path.py b/markup/path.py
--- a/markup/path.py
+++ b/markup/path.py
@@ -55,38 +55,51 @@
''
>>> Path("root/baz").select(XML('')).render()
''
- >>> Path("root/foo/*").select(XML('')).render()
+ >>> Path("root/foo/*").select(
+ ... XML('')).render()
''
Selecting text nodes:
- >>> Path("item/text()").select(XML('- Foo
')).render()
+ >>> Path("item/text()").select(
+ ... XML('- Foo
')).render()
'Foo'
- >>> Path("item/text()").select(XML('- Foo
- Bar
')).render()
+ >>> Path("item/text()").select(
+ ... XML('- Foo
- Bar
')).render()
'FooBar'
Skipping ancestors:
- >>> Path("foo/bar").select(XML('')).render()
+ >>> Path("foo/bar").select(
+ ... XML('')).render()
''
- >>> Path("foo/*").select(XML('')).render()
+ >>> Path("foo/*").select(
+ ... XML('')).render()
''
- >>> Path("root/bar").select(XML('')).render()
+ >>> Path("root/bar").select(
+ ... XML('')).render()
''
- >>> Path("root/bar").select(XML('')).render()
+ >>> Path("root/bar").select(
+ ... XML('')).render()
''
- >>> Path("root/*/bar").select(XML('')).render()
+ >>> Path("root/*/bar").select(
+ ... XML('')).render()
''
- >>> Path("root//bar").select(XML('')).render()
+ >>> Path("root//bar").select(
+ ... XML('')).render()
''
- >>> Path("root//bar").select(XML('')).render()
+ >>> Path("root//bar").select(
+ ... XML('')).render()
''
Using simple attribute predicates:
- >>> Path("root/item[@important]").select(XML(' ')).render()
+ >>> Path("root/item[@important]").select(
+ ... XML(' ')).render()
' '
- >>> Path('root/item[@important="very"]').select(XML(' ')).render()
+ >>> Path('root/item[@important="very"]').select(
+ ... XML(' ')).render()
' '
- >>> Path("root/item[@important='very']").select(XML(' ')).render()
+ >>> Path("root/item[@important='very']").select(
+ ... XML(' ')).render()
''
>>> Path("root/item[@important!='very']").select(
... XML(' ')).render()
@@ -203,12 +216,12 @@
stack[-1] += 1
elif kind is Stream.START and not closure:
- # FIXME: If this step is not a closure, it cannot be matched
- # until the current element is closed... so we need to
- # move the cursor back to the last closure and retest
- # that against the current element
+ # If this step is not a closure, it cannot be matched until the
+ # current element is closed... so we need to move the cursor
+ # back to the last closure and retest that against the current
+ # element
closures = [step for step in self.steps[:stack[-1]] if step[0]]
- closures.reverse()
+ closures.reverse()
for closure, node_test, predicates in closures:
stack[-1] -= 1
if closure: