summaryrefslogtreecommitdiffstats
path: root/org/madore
diff options
context:
space:
mode:
Diffstat (limited to 'org/madore')
-rw-r--r--org/madore/damlengine/TodoCutHere.java28
-rw-r--r--org/madore/damlengine/TodoEntryElement.java1
2 files changed, 17 insertions, 12 deletions
diff --git a/org/madore/damlengine/TodoCutHere.java b/org/madore/damlengine/TodoCutHere.java
index 51935e7..4438b5f 100644
--- a/org/madore/damlengine/TodoCutHere.java
+++ b/org/madore/damlengine/TodoCutHere.java
@@ -38,7 +38,23 @@ public final class TodoCutHere extends TodoDefaultElement {
div.appendChild(ctx.doc.createComment(" EMPTY "));
node.getParentNode().replaceChild(div, node);
} else {
+ // Remove every node that follows.
+ Node killPoint = node;
+ while ( ! killPoint.isSameNode(ctx.ent.mainDivNode) ) {
+ Node parent = killPoint.getParentNode();
+ while ( killPoint.getNextSibling() != null )
+ parent.removeChild(killPoint.getNextSibling());
+ // FIXME: deleted node may already have found its way
+ // in the todo deque, which means it could cause a
+ // null pointer exception by trying to access its
+ // parent node. Do something about this!
+ killPoint = parent;
+ }
+ // Remove the cut-point node itself.
+ node.getParentNode().removeChild(node);
+ // Now add the link to the full content.
Element p = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "p");
+ ctx.ent.mainDivNode.appendChild(p);
Element a = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "a");
p.appendChild(a);
final String baseDir = ((ctx.gc.uriToTop==null)?"":(ctx.gc.uriToTop+"weblog/"));
@@ -56,18 +72,6 @@ public final class TodoCutHere extends TodoDefaultElement {
a.appendChild(ctx.doc.createTextNode("[Leger ultra\u2026]"));
else
a.appendChild(ctx.doc.createTextNode("[\u2026]"));
- node.getParentNode().replaceChild(p, node);
- Node killPoint = p;
- while ( ! killPoint.isSameNode(ctx.ent.mainDivNode) ) {
- Node parent = killPoint.getParentNode();
- while ( killPoint.getNextSibling() != null )
- parent.removeChild(killPoint.getNextSibling());
- // FIXME: deleted node may already have found its way
- // in the todo deque, which means it could cause a
- // null pointer exception by trying to access its
- // parent node. Do something about this!
- killPoint = parent;
- }
}
}
diff --git a/org/madore/damlengine/TodoEntryElement.java b/org/madore/damlengine/TodoEntryElement.java
index fa29ebe..c41237b 100644
--- a/org/madore/damlengine/TodoEntryElement.java
+++ b/org/madore/damlengine/TodoEntryElement.java
@@ -161,6 +161,7 @@ public final class TodoEntryElement extends TodoDefaultElement {
Element footer = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "footer");
article.appendChild(footer);
article.appendChild(ctx.doc.createTextNode("\n"));
+ footer.setAttributeNS(null, "class", "entry-footer cleared");
if ( entryCatList.size() > 0 ) {
Element token = ctx.doc.createElementNS(DamlEngine.DAML_NS,
"d:implicit-do-categories");