| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #435.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, instances of the Markdown class were represented as any one
of 'md', 'md_instance', or 'markdown'. This inconsistency made it
difficult when developing extensions, or just maintaining the existing
code. Now, all instances are consistently represented as 'md'.
The old attributes on class instances still exist, but raise a
DeprecationWarning when accessed. Also on classes where the instance was
optional, the attribute always exists now and is simply None if no
instance was provided (previously the attribute wouldn't exist).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All processors and patterns now get "registered" to a Registry.
Each item is given a name (string) and a priority. The name is for
later reference and the priority can be either an integer or float
and is used to sort. Priority is sorted from highest to lowest. A
Registry instance is a list-like iterable with the items auto-sorted
by priority. If two items have the same priority, then they are
listed in the order there were "registered". Registering a new
item with the same name as an already registered item replaces
the old item with the new item (however, the new item is sorted by
its newly assigned priority). To remove an item, "deregister" it by
name or index.
A backwards compatible shim is included so that existing simple
extensions should continue to work. DeprecationWarnings will
be raised for any code which calls the old API.
Fixes #418.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
This allows the run method to determine if a block is or is not a match in the
midst of parsing outside of the test method. The goal is to eliminate the
often redundant test method in the future. In the interim, it remains and
if the run method returns None, the existing behavior is maintained. Returning
None may generate a DepreciationWarning later. Note that test must still return
True to even get to the run method.
|
|
|
|
| |
should be more future proof.
|
| |
|
| |
|
|
|
|
| |
if they desire.
|
|
|
|
| |
loose lists. In fact, non-loose lists are currently broken - seen as code blocks.
|
|
|
|
| |
For example, this would allow an extension to remove/replace 'Prettify' treeprocessor with something that added more or less whitespace without adverse effects.
|
| |
|
|
|