aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/serializers.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix double escaping of amp in attributes (#670)Isaac Muse2018-07-291-3/+8
| | | | | | | | | | Serializer should only escape & in attributes if not part of & Better regex avoid Unicode and `_` in amp detection. In general, we don't want to escape already escaped content, but with code content, we want literal representations of escaped content, so have code content explicitly escape its content before placing in AtomicStrings. Closes #669.
* Add missing comma in HTML_EMPTYzyxw592018-07-241-1/+1
| | | Because of the missing comma, the last two tags in the list, `meta` and `param` are interpreted as a single string literal `"metaparam"`, so the serializer fails to correctly produce empty elements for `<meta>` and `<param>` tags.
* Improve serializer test coverageWaylan Limberg2018-07-241-14/+3
| | | | | | | | | Should be 100% coverage now. The ProcessingInstruction needed to be imported directly from ElementTree as PY27 was using a PIProxy which resulted in a bug. Interestingly, PY3 worked fine. Also removed the encoding code as it was not used. Besides it was only ever accessable from a private function.
* Simplify namespace support in serializer.Waylan Limberg2018-07-241-127/+48
| | | | Fixes #679.
* Flake8 cleanup (mostly whitespace).Waylan Limberg2014-11-201-13/+19
| | | | | | Got all but a couple files in the tests (ran out of time today). Apparently I have been using some bad form for years (although a few things seemed to look better before the update). Anyway, conformant now.
* Mark a few more lines with 'no cover' - missed them the first time through. ↵Waylan Limberg2014-07-111-1/+1
| | | | The rest should have test cases added.
* Marked a bunch of lines as 'no cover'. Coverage at 91%Waylan Limberg2014-07-111-9/+9
|
* Fix: "AttributeError: 'dict_items' object has no attribute 'sort'"Lucas Clemente Vella2013-09-111-1/+1
| | | | Happens on pip install with Python 3.
* Serializers now preserve case of tags.Waylan Limberg2013-08-071-4/+3
| | | | | | | It is up to the markdown code (and extension authors to make sure tags are of the correct case (there may be cases were an extension might need to mix cases - which should be preserved). Fixes #237. Thanks for the report @eichin.
* Future imports go after the docstringsAdam Dinwoodie2013-03-181-1/+1
| | | | | | | | | A `from __future__ import ...` statement must go after any docstrings; since putting them before the docstring means the docstring loses its magic and just becomes a string literal. That then causes a syntax error if there are further future statements after the false docstring. This fixes issue #203, using the patch provided by @Arfrever.
* Now using universal code for Python 2 & 3.Waylan Limberg2013-02-271-2/+4
| | | | | | | | | | The most notable changes are the use of unicode_literals and absolute_imports. Actually, absolute_imports was the biggest deal as it gives us relative imports. For the first time extensions import markdown relative to themselves. This allows other packages to embed the markdown lib in a subdir of their project and still be able to use our extensions.
* It is spelled 'serializers' not 'searializers'.Waylan Limberg2012-01-201-0/+275