html5/spec-author-view patch.anolis,1.11,1.12

Update of /sources/public/html5/spec-author-view
In directory hutz:/tmp/cvs-serv32725

Modified Files:
	patch.anolis 
Log Message:
further tinkering with dfn popups


Index: patch.anolis
===================================================================
RCS file: /sources/public/html5/spec-author-view/patch.anolis,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- patch.anolis	22 Aug 2010 10:10:59 -0000	1.11
+++ patch.anolis	22 Aug 2010 12:34:36 -0000	1.12
@@ -1,6 +1,6 @@
 diff -r 16550726fd0d anolis
 --- a/anolis	Sun Aug 30 16:53:19 2009 -0500
-+++ b/anolis	Sun Aug 22 18:54:43 2010 +0900
++++ b/anolis	Sun Aug 22 21:32:00 2010 +0900
 @@ -70,10 +70,10 @@
  
  def getOptParser():
@@ -16,7 +16,7 @@
  
 diff -r 16550726fd0d anolislib/processes/filter.py
 --- a/anolislib/processes/filter.py	Sun Aug 30 16:53:19 2009 -0500
-+++ b/anolislib/processes/filter.py	Sun Aug 22 18:54:43 2010 +0900
++++ b/anolislib/processes/filter.py	Sun Aug 22 21:32:00 2010 +0900
 @@ -5,23 +5,4 @@
          return
      selector = cssselect.CSSSelector(kwargs["filter"])
@@ -44,8 +44,8 @@
 +        element.drop_tree()
 diff -r 16550726fd0d anolislib/processes/terms.py
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/anolislib/processes/terms.py	Sun Aug 22 18:54:43 2010 +0900
-@@ -0,0 +1,378 @@
++++ b/anolislib/processes/terms.py	Sun Aug 22 21:32:00 2010 +0900
+@@ -0,0 +1,379 @@
 +# coding=UTF-8
 +# Copyright (c) 2010 Michael(tm) Smith
 +#
@@ -188,12 +188,15 @@
 +                                del dfnParentNode.attrib["id"]
 +                            descendants = dfnParentNode.xpath(".//*[self::dfn or @id]")
 +                            for descendant in descendants:
++                                if descendant.tag == "dfn":
++                                    descendant.tag = "span"
++                                if "id" in descendant.attrib:
++                                    del descendant.attrib["id"]
 +                                # if the text content of this descendant is the
 +                                # same as the text content of the term, then we
-+                                # don't want to repeat it, but instead we
++                                # don't want to repeat it, so instead we
 +                                # replace it with ellipses
 +                                if descendant.text_content().lower() == term.text_content().lower():
-+                                    descendant.tag = "span"
 +                                    tail = ""
 +                                    if descendant.tail is not None:
 +                                        tail = descendant.tail
@@ -208,8 +211,6 @@
 +                                    # characters (other than ellipses) to
 +                                    # indicate that we've ellided something
 +                                    dfnParentNode.text = "*** "
-+                                if "id" in descendant.attrib:
-+                                    del descendant.attrib["id"]
 +                            dfnContext.append(dfnParentNode)
 +                            indexEntry.append(dfnContext)
 +                    # we need a first letter so that we can build navigational

Received on Sunday, 22 August 2010 12:34:39 UTC