summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/TodoTranslations.java
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2011-09-07 18:01:38 +0200
committerDavid A. Madore <david+git@madore.org>2011-09-07 18:01:38 +0200
commit457ce3fb7d0bd2198d1397912093cc1f99befe26 (patch)
treecd102997f1e73fe2fb6bbce9402e50861f244a12 /org/madore/damlengine/TodoTranslations.java
parent9d7357116a9d47c1dacd2bddfb1bbdea50f3e5fb (diff)
downloaddamlengine-457ce3fb7d0bd2198d1397912093cc1f99befe26.tar.gz
damlengine-457ce3fb7d0bd2198d1397912093cc1f99befe26.tar.bz2
damlengine-457ce3fb7d0bd2198d1397912093cc1f99befe26.zip
Use HTML5 elements for header, hgroup, nav(bar), footer.
Diffstat (limited to 'org/madore/damlengine/TodoTranslations.java')
-rw-r--r--org/madore/damlengine/TodoTranslations.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org/madore/damlengine/TodoTranslations.java b/org/madore/damlengine/TodoTranslations.java
index dc67c30..cfd08af 100644
--- a/org/madore/damlengine/TodoTranslations.java
+++ b/org/madore/damlengine/TodoTranslations.java
@@ -16,7 +16,7 @@ public final class TodoTranslations extends TodoElement {
public void handle() {
if ( ctx.gc.translations == null ) {
Node ws = node.getNextSibling();
- if ( ( ws.getNodeType() == Node.TEXT_NODE
+ if ( ws != null && ( ws.getNodeType() == Node.TEXT_NODE
|| ws.getNodeType() == Node.CDATA_SECTION_NODE )
&& Pattern.matches("^\\s*$",((CharacterData)ws).getData()) )
node.getParentNode().removeChild(ws);
@@ -55,7 +55,7 @@ public final class TodoTranslations extends TodoElement {
toProcess.add(TodoElement.getTodoElement(p, this.ctx, this));
}
Node ws = node.getNextSibling();
- if ( ( ws.getNodeType() == Node.TEXT_NODE
+ if ( ws != null && ( ws.getNodeType() == Node.TEXT_NODE
|| ws.getNodeType() == Node.CDATA_SECTION_NODE )
&& Pattern.matches("^\\s*$",((CharacterData)ws).getData()) )
node.getParentNode().removeChild(ws);