trentm / trentm/python-markdown2
python fenced code blocks
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 459
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 4
Description
Python version: Python 2.7.3
markdown2 version: 2.1.0
SO: windows
In python code methods inside clases are considerated "< pre > < code >..."
Example:
class BezierDrawer(QtGui.QWidget):
"""Draw a Bezier Curve"""
def __init__(self):
super(BezierDrawer, self).__init__()
self.setGeometry(300, 300, 450, 450)
self.setWindowTitle("Bezier Curves")
def paintEvent(self, e):
qp = QtGui.QPainter()
qp.begin(self)
qp.setRenderHints(QtGui.QPainter.Antialiasing, True)
self.doDrawing(qp)
qp.end()
Result:
<span class="k">class</span> <span class="nc">BezierDrawer</span><span class="p">(</span><span class="n">QtGui</span><span class="o">.</span><span class="n">QWidget</span><span class="p">):</span>
<span class="sd">"""Draw a Bezier Curve"""</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="nb">super</span><span class="p">(</span><span class="n">BezierDrawer</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setGeometry</span><span class="p">(</span><span class="mi">300</span><span class="p">,</span> <span class="mi">300</span><span class="p">,</span> <span class="mi">450</span><span class="p">,</span> <span class="mi">450</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">setWindowTitle</span><span class="p">(</span><span class="s">"Bezier Curves"</span><span class="p">)</span>
<pre><code>...

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by reproducing the supplied Python fenced-code example with markdown2 2.1.0 on Windows, then trace fenced-code handling and compare the generated HTML with the expected code block output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100