Author: jonpryor
Date: 2007-07-18 15:16:46 -0400 (Wed, 18 Jul 2007)
New Revision: 82230
Modified:
trunk/monodoc/tools/ChangeLog
trunk/monodoc/tools/monodocer.cs
Log:
* monodocer.cs: Change OrderDocsNodes() so that it uses
XmlNode.InsertAfter() instead of XmlNode.InsertBefore(). The result
is
mostly the same (i.e. no regression test changes), but if you have a
non-ordered node between other nodes this will force the non-ordered
node
to the *end* of the <Docs/> children, not the start. For example,
given
the input <Docs><summary/><exception/><remarks/></Docs/>, we used to
get
<Docs><exception/><summary/><remarks/></Docs>, while we now get
<Docs><summary/><remarks/><exception/></Docs>.
Modified: trunk/monodoc/tools/ChangeLog
===================================================================
--- trunk/monodoc/tools/ChangeLog 2007-07-18 18:51:48 UTC (rev 82229)
+++ trunk/monodoc/tools/ChangeLog 2007-07-18 19:16:46 UTC (rev 82230)
@@ -1,3 +1,14 @@
+2007-07-18 Jonathan Pryor <[EMAIL PROTECTED]>
+
+ * monodocer.cs: Change OrderDocsNodes() so that it uses
+ XmlNode.InsertAfter() instead of XmlNode.InsertBefore(). The result
is
+ mostly the same (i.e. no regression test changes), but if you have a
+ non-ordered node between other nodes this will force the non-ordered
node
+ to the *end* of the <Docs/> children, not the start. For example,
given
+ the input <Docs><summary/><exception/><remarks/></Docs/>, we used to
get
+ <Docs><exception/><summary/><remarks/></Docs>, while we now get
+ <Docs><summary/><remarks/><exception/></Docs>.
+
2007-07-17 Jonathan Pryor <[EMAIL PROTECTED]>
* monodocer.cs: Insert the type's <Docs/> node before <Members/>. This
is
Modified: trunk/monodoc/tools/monodocer.cs
===================================================================
--- trunk/monodoc/tools/monodocer.cs 2007-07-18 18:51:48 UTC (rev 82229)
+++ trunk/monodoc/tools/monodocer.cs 2007-07-18 19:16:46 UTC (rev 82230)
@@ -1636,15 +1636,13 @@
}
}
}
- for (int i = newChildren.Count-1; i >= 0; --i) {
- XmlNode n = (XmlNode) newChildren [i];
- if (n == null)
- continue;
- XmlNode r = (i+1) == newChildren.Count ? null :
(XmlNode) newChildren [i+1];
- if (r == null)
- continue;
- docs.RemoveChild (n);
- docs.InsertBefore (n, r);
+ if (newChildren.Count >= 0)
+ docs.PrependChild ((XmlNode) newChildren [0]);
+ for (int i = 1; i < newChildren.Count; ++i) {
+ XmlNode prev = (XmlNode) newChildren [i-1];
+ XmlNode cur = (XmlNode) newChildren [i];
+ docs.RemoveChild (cur);
+ docs.InsertAfter (cur, prev);
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches