aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/extensions/attr_list.py
Commit message (Collapse)AuthorAgeFilesLines
* No `=` in key or value of attr lists.Waylan Limberg2015-02-241-2/+2
| | | | Fixes #389. Thanks for the report @lazka.
* Flake8 cleanup (mostly whitespace).Waylan Limberg2014-11-201-10/+20
| | | | | | 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.
* Standardized all extension header comments to a uniform format.Waylan Limberg2014-08-211-6/+5
|
* 'http://packages.python.org/Markdown/' => ↵Waylan Limberg2014-08-211-1/+1
| | | | 'https://pythonhosted.org/Markdown/'. The former redirects to the latter anyway. Might as well point to the actual destination.
* Update extensions for Extension.__init__ refactorWaylan Limberg2014-07-311-2/+2
| | | | | | | | | | | | | | | | | Fixes #325. All extensions can now accept a dict of configs or **kwargs, not just a list of tuples. Third party extensions may want to follow suite. Extensions may only accept keyword arguments in the future. These changes still need to be documented. A couple things of note: The CodeHilite extension previously issued a DeprecationWarning if the old config key `force_linenos` was used. With thins change, a KeyError will now be raised. The `markdown.util.parseBoolValue` function gained a new argument: `preserve_none` (defaults to False), which when set to True, will pass None through unaltered (will not convert it to False).
* Marked a bunch of lines as 'no cover'. Coverage at 91%Waylan Limberg2014-07-111-1/+1
|
* tables and attr_list compatibilityryneeverett2013-11-131-0/+2
|
* Fix Python 3 compat in Attr_list. Fixes #218.Waylan Limberg2013-07-281-1/+1
|
* Added support for attr_lists on definition list terms.Waylan Limberg2013-07-191-2/+2
| | | | | | | | Like headers (h1-6) dt's can only be on one line, so we need to use the header regex on dt's. This was implemented after considering a recent [discussion](http://six.pairlist.net/pipermail/markdown-discuss/2013-July/002859.html) on the markdown mailing list. Prior to that discussion, I never considered that it was impossable to set block level attrs on dt's. Now it is.
* Allow inline attr_lists at end of header.Waylan Limberg2013-07-191-1/+1
| | | | | | | | | | A header can be only one line - so unlike other block level elements, a attr_list must be at th eend of the line. To disingush it from an inline attr_list on the last child in a header, we must require at least one space before th eblock-level attrt_list. Always intended it to work that way. Not sure how I missed that before. At least we're testing for it now.
* Attr_List Extension now also supports nested ol's.Waylan Limberg2013-07-191-11/+11
| | | | | | | | | | Not sure how I missed that when committing ea4af0d. Also as a side-effect, this fixes #230 - which brought my previous oversight to my attention. Thanks for the report @divisoryang. Also added some tests - including tests of list items without attr_lists. Sometimes I forget to test markup that does not use an extension when an extension is enabled. That's what resulted in #230 being reported.
* Minor cleanup.Waylan Limberg2013-06-161-1/+0
|
* Attr_List Extension now support attr_lists on nested lists.Waylan Limberg2013-06-161-1/+28
| | | | | | A list item with a nested list complicates were the attr_list can be. Fixes #218. Thanks for the report @jpzimmer.
* 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.
* Merge branch '2and3'Waylan Limberg2013-02-271-6/+9
|\
| * Now using universal code for Python 2 & 3.Waylan Limberg2013-02-271-6/+9
| | | | | | | | | | | | | | | | | | | | 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.
* | Consistant parsing of attr_lists in Python3.3Waylan Limberg2013-02-251-2/+2
|/ | | | | | Fixes #194. The NAME_RE regex was failing in Python 3.3 with the range `\u10000-\ueffff`. Also, in Python =< 3.2 the range `\u0300-\u036f` matches a colon but not in Python 3.3.
* nl2br and attr_list compatability.Waylan Limberg2013-02-061-1/+1
| | | | | | Fixes #177. When using both extensions, breaks (`<br>`) must have a linebreak (`\n`) after them before attr_list is run. This patch reorders the treeprocessors so that happens ('attr_list' runs after 'prettify' not before). Also had to alter headerid extension so it runs after 'prettify' or it would run before 'attr_list' if loaded before 'attr_list' by user.
* Better fix for #164. Works in Python 2 & 3.Waylan Limberg2012-12-181-4/+4
|
* Fixed #165. Switched the order of treeprocessors when attr_list and headerid ↵Waylan Limberg2012-12-131-7/+1
| | | | 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)
* Fixed #164. attr_list extension attribute names are now sanitized and won't ↵Waylan Limberg2012-12-131-2/+13
| | | | crash the serealizer.
* Fixed #106. Replaced all references to freewisdom.org (except for Yuri's ↵Waylan Limberg2012-06-281-2/+2
| | | | homepage).
* Fixed #109. The attr_list extension can now be loaded either before or after ↵Waylan Limberg2012-06-281-2/+6
| | | | the headerid extension.
* Fixed a few minor Python2.4 incompatabilities. Runs in 2.4-2.7 cleanly.Waylan Limberg2011-07-221-1/+7
|
* Added attribute list extension inspired by Maruku's attribute list feature. ↵Waylan Limberg2011-06-171-0/+122
See issue #7. Also likely to become a replacement for the headerid extension (with a little more work - need a forceid option) which means it will also address issue #16. The extension works with some limited testing. Still needs tests and documentation. Currently breaks toc extension - which should run after attr_list, not before.