Anonymous avatar Anonymous committed 7bbcf1f

Bug in parsing of body text (properties, scheduled and deadline are included) fixed

Comments (0)

Files changed (3)

         else:      # we are processing a non-heading line
             if line.startswith('#+SEQ_TODO'):
                 todos |= set(_RE_TODO_KWDS.findall(line))
-
-            if line.startswith('#'):
-                bodytext = bodytext + line
-
+                continue
             if line.find(':PROPERTIES:') >= 0: continue
             if line.find(':END:') >= 0: continue
             prop_srch = _RE_PROP_SRCH.search(line)
                 (dl, rl) = get_daterangelist(line)
                 datelist += dl
                 rangelist += rl
+            if not (line.startswith('#') or _sched_date or _deadline_date):
+                bodytext = bodytext + line
 
     # write out last node
     thisNode = Orgnode(level, heading, bodytext, tag1, alltags)
              (date(2010, 8, 7), date(2010, 8, 8)),
              (datetime(2010, 8, 9, 0, 30), datetime(2010, 8, 10, 13, 20)),
              ],
+         Body = """\
+  - <2010-08-16 Mon> DateList
+  - <2010-08-07 Sat>--<2010-08-08 Sun>
+  - <2010-08-09 Mon 00:30>--<2010-08-10 Tue 13:20> RangeList
+"""
          )
     ]
             val = value_from_data_key(node, key)
             eq_(kwds[key], val,
                 msg=('check value of %d-th node of key "%s" from "%s". '
-                     'Orgnode.%s() = %s != %s.'
+                     'Orgnode.%s() = "%s" != "%s".'
                      ) % (i, key, oname, key.title(), val, kwds[key]))
 
 def test_data():
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.