- From: Robin Berjon via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 07 Feb 2012 16:56:40 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/ReSpec.js/js
In directory hutz:/tmp/cvs-serv19714
Modified Files:
respec.js
Log Message:
try to fix abstracts that don't have a P child properly
Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -d -r1.183 -r1.184
--- respec.js 7 Feb 2012 16:12:56 -0000 1.183
+++ respec.js 7 Feb 2012 16:56:38 -0000 1.184
@@ -946,6 +946,12 @@
makeAbstract: function () {
var abs = document.getElementById("abstract");
if (!abs) error("Document must have one element with ID 'abstract'");
+ if (abs.getElementsByTagName("p").length === 0) {
+ // warning("The abstract section should contain a <p> element rather than text directly. Attempting to insert one.");
+ var p = sn.element("p");
+ sn.copyChildren(abs, p);
+ abs.appendChild(p);
+ }
var h2 = sn.element("h2", {}, null, "Abstract");
abs.insertBefore(h2, abs.firstChild);
sn.addClass(abs, "introductory");
Received on Tuesday, 7 February 2012 16:59:01 UTC