Login
or
register
Overview
Introduction
Features
Credits
License
This Wiki
Status
News
Releases
Change Log
Recent Wiki Edits
User Guide
Installation
Command Line
Using as a Module
Integration
Reporting Bugs
Advanced
Mailing List
Source Code
Test Suite
Extensions
Extensions
Writing Extensions
Available Extensions
Related Projects
Tickets
▹ 000070
Footnote ref without a definition raises exception
Anonymous users must enter
captcha
below.
Don't put anything here
Don't put anything here
Don't put anything here
Ticket Information
Ticket Title
The footnotes extension does not like it if a footnote is not a matching pair. This works: Some text[^Footnote] [^Footnote]: Test This creates an exception: Some text[^Footnote] The exception is: Traceback: File "/usr/lib/pymodules/python2.6/markdown/__init__.py" in markdown 598. return md.convert(text) File "/usr/lib/pymodules/python2.6/markdown/__init__.py" in convert 395. newRoot = treeprocessor.run(root) File "/usr/lib/pymodules/python2.6/markdown/treeprocessors.py" in run 271. text), child) File "/usr/lib/pymodules/python2.6/markdown/treeprocessors.py" in __handleInline 95. data, patternIndex, startIndex) File "/usr/lib/pymodules/python2.6/markdown/treeprocessors.py" in __applyPattern 219. node = pattern.handleMatch(match) File "/usr/lib/pymodules/python2.6/markdown/extensions/footnotes.py" in handleMatch 269. a.text = str(self.footnotes.footnotes.index(id) + 1) File "/usr/lib/pymodules/python2.6/markdown/odict.py" in index 120. return self.keyOrder.index(key) Exception Type: ValueError at /wiki/forside/brygmetoder/_edit/ Exception Value: list.index(x): x not in list This fixes it (in footnotes.py) def handleMatch(self, m): sup = etree.Element("sup") a = etree.SubElement(sup, "a") id = m.group(2) sup.set('id', self.footnotes.makeFootnoteRefId(id)) a.set('href', '#' + self.footnotes.makeFootnoteId(id)) a.set('rel', 'footnote') try: a.text = str(self.footnotes.footnotes.index(id) + 1) return sup except ValueError: return None
Reported by
Assigned to
Status
open
someday
resolved
closed
Resolution
n.a.
fixed
wontfix
Don't put anything here
Don't put anything here
Advanced Fields
Priority
unassigned
high
medium
low
Resolution Explanation
Component
About This Edit
Minor Edit
Edit Summary
Don't put anything here
save
preview
cancel
Powered by
Sputnik
|
XHTML 1.1