diff options
author | tk0miya <i.tkomiya@gmail.com> | 2014-08-24 12:28:37 +0900 |
---|---|---|
committer | tk0miya <i.tkomiya@gmail.com> | 2014-08-24 12:28:37 +0900 |
commit | 08cf46cbc90c43a164871fbb52b039cb0a024862 (patch) | |
tree | 7743fed023f78ddbbf7fabfb4667fdb9ec763536 /sphinx/util/websupport.py | |
parent | 38fcb0956f8b6864dd694c0febfcd1cdae51b361 (diff) | |
download | sphinx-git-08cf46cbc90c43a164871fbb52b039cb0a024862.tar.gz |
Fix #1509 TODO extension not compatible with websupport
websupport assigns UID to every node on reading phase and reads it
on writing phase.
but `todolist` directive generates new paragraph node on resolving phase.
This problem will occur any extensions that generate paragraph nodes
on resolving phase.
This fix changes websupport ignores paragraph node not having UIDs.
Diffstat (limited to 'sphinx/util/websupport.py')
-rw-r--r-- | sphinx/util/websupport.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/util/websupport.py b/sphinx/util/websupport.py index 050c528a2..5535da569 100644 --- a/sphinx/util/websupport.py +++ b/sphinx/util/websupport.py @@ -7,6 +7,7 @@ :license: BSD, see LICENSE for details. """ + def is_commentable(node): #return node.__class__.__name__ in ('paragraph', 'literal_block') - return node.__class__.__name__ == 'paragraph' + return node.__class__.__name__ == 'paragraph' and hasattr(node, 'uid') |