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
▹ 000030
markdown creates em and strong elements without text nodes
Anonymous users must enter
captcha
below.
Ticket Information
Ticket Title
markdown creates em and strong elements without text nodes. This causes unintentional wacky rendering throughout the remainder of the page. Try this and you will see what I mean. >>> import markdown >>> em_test = "** <-- This shouldn't be a em without a text node" >>> markdown.markdown(em_test) u"<p><em /> <-- This shouldn't be a em without a text node</p>" I've have fixed this with a postprocessor. import re BAD_TAGS_RE = re.compile(r'<(?=em|strong).*?/>') class FixEmptiesPostprocessor(Postprocessor): def run(self, text): text = "".join(BAD_TAGS_RE.split(text)) return text
Reported by
Assigned to
Status
open
someday
resolved
closed
Resolution
n.a.
fixed
wontfix
Advanced Fields
Don't put anything here
Don't put anything here
Priority
unassigned
high
medium
low
Resolution Explanation
Component
Don't put anything here
Don't put anything here
About This Edit
Don't put anything here
Minor Edit
Edit Summary
Don't put anything here
save
preview
cancel
Powered by
Sputnik
|
XHTML 1.1