| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Without this, all SyntaxTests would fail from a git checkout on Windows.
On other systems, it should have no effect.
|
|
|
|
| |
extensions are used togeather. While this means headerid may alter IDs defined in attr_lists for uniqueness, automaticaly generated ids will not contain unparsed attr_lists. This is the lesser of two evils - and actually generates a more valid output (all IDs will be unique)
|
|
|
|
| |
crash the serealizer.
|
|
|
|
|
| |
Also refactored the version info to force PEP 386 compliance and to avoid
the need to change the version in both the source and setup.py
|
|
|
|
|
|
|
| |
When in safe_mode, there is no raw html to contain `markdown=1` for
processing, so there is no need to turn on that feature. The symptom
reported in issue #160 appears to be a side effect of commit
a2377e1129331430998de821ed3abf38247edca1.
|
|\
| |
| | |
Fixed pyflakes warnings
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Apparently, the `errors` keyword to encode was added in Python 2.7.
In previous versions, it was just a positional argument. This should
now work in all support versions.
Thanks to @Gamma3000 for assistance in working through this issue.
|
|/
|
|
|
|
|
|
| |
This is another try at this problem. The trick is geting code that works
with both Python 2 and Python 3. I think this does it. The only improvment
I can see now is to catch any errors and customize the error message to sugg
that the user set the environment variable PYTHONIOENCODING to the desired
encoding before calling the commandline script.
|
|\ |
|
| |
| |
| | |
Thanks @mitya57.
|
| |\
| | |
| | | |
Improve docs/extensions/index.txt so that the name for each extension is properly identified.
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| |
| |
| |
| | |
only of an Element - rather than the html which just gets html escaped in the output anyway.
|
| | |
|
| |
| |
| |
| | |
placeholder is an Elementtree Element.
|
| |\
| | |
| | | |
Fix the link in docs' bottom panel
|
| |/ |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Add `long_description` attribute to `data` in `setup.py`
|
| | |
|
|/
|
|
| |
so that there's no text breakage on PyPI page
|
|
|
| |
Thanks for the report.
|
|\
| |
| | |
Typo: Boolen -> Boolean.
|
|/ |
|
|\
| |
| | |
Fixed not working "index" link in extensions documentation
|
| | |
|
|\ \
| |/
|/| |
Misc typos.
|
|/ |
|
|\
| |
| | |
Fixed `footnote_many_footnotes` test
|
| |\ |
|
| |/
|/| |
|
|/ |
|
|\ |
|
| |\
| | |
| | | |
Fix unicode problem in headerid extension
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
slugify() requires unicode, not a str instance. This causes the extension to
crash:
File "/home/erik/virtualenv/bb/local/lib/python2.7/site-packages/markdown/__init__.py" in markdown
386. return md.convert(text)
File "/home/erik/virtualenv/bb/local/lib/python2.7/site-packages/markdown/__init__.py" in convert
287. newRoot = treeprocessor.run(root)
File "/home/erik/virtualenv/bb/local/lib/python2.7/site-packages/markdown/extensions/headerid.py" in run
140. id = slugify(''.join(itertext(elem)), sep)
File "/home/erik/virtualenv/bb/local/lib/python2.7/site-packages/markdown/extensions/headerid.py" in slugify
93. value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
TypeError: must be unicode, not str
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 2.x, if you write to stdout and stdout is piped
(for example: `python -m markdown foo.txt | less`), then
`sys.stdout.encoding` is `None` and an error is rasied.
Commit 1132f9e20cd7a5d6be809651f1034c44c32dbc0e was an attempt to
fix this, and it works in Python 2.x.
However, it does not work in Python 3.x, which does not exhibit this problem.
In fact, that fix actually breaks things in Python 3 whether the output
is piped or not. Additionaly, in Python 2.x, the fix is not needed if the
output is not being piped.
As we do not have a version specific issue, but an issue with
`sys.stdout.encoding`, we check for that to determine which way to go.
This way, the "right thing" *should* happen every time.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As HTML5 has depreciated use of `rev=anything` and `rel=footnotes`, they are no
longer inlcuded in the output when the output_format is set to HTML5. Note that
if someone successful registers a spec for `rel=footnotes` in the future (as
a microformat), then that could be considered valid. But until that happens,
it is invlaid to use in HTML5. Therefore, we remove it from the output (when
outputing HTML% only).
As an alternative, two new classes are set (in all output_formats). On the link
to the footnote (where `rel=footnotes` was used), we set `class=footnote-ref`
and on the backlink (where `rev=footnote` was used), we set
`class=footnote-backref`.
Also updated the tests to reflect to the new classes in the output.
|
|/
|
|
|
|
|
|
|
|
| |
Specificaly, `self.output_format` is defined and contains a string of the
output format used on the instance. This is more useful that an instance
of the searializer when determining alternate behavior elsewhere in the parser.
For example, see Issue #129.
Also cleaned up the error when an invalid format is provided. We now re-raise
the original error (with a custom message) rather than raising a new error.
|