| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Allows users and/or extensions to alter the list of block level
elements. The old implementation remains with a DeprecationWarning.
Fixes #575.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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).
|
|
|
| |
Fixes #689.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Also refactor from regex to a list and add comments to explain why the
elements are in the list for future reference. Fixes #543.
|
|
|
|
| |
Add new InlineProcessor class that handles inline processing much better and allows for more flexibility. This adds new InlineProcessors that no longer utilize unnecessary pretext and posttext captures. New class can accept the buffer that is being worked on and manually process the text without regex and return new replacement bounds. This helps us to handle links in a better way and handle nested brackets and logic that is too much for regular expression. The refactor also allows image links to have links/paths with spaces like links. Ref #551, #613, #590, #161.
|
| |
|
|
|
| |
Python 3.6 is starting to reject invalid escapes. Regular expression patterns should be raw strings to avoid having regex escapes being mistaken for invalid string escapes. Fixes #611.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
A couple scenarios with "None" were previously not accounted for.
Also updated tests which guives us 100% for markdown/util.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
|
|
|
|
|
| |
This was limiting the parser to only 10,000 placeholders (0-9999) per document.
removing this limitation allows longer documents ot be parsered correctly.
Fixes #255.
|
| |
|
|
|
|
| |
and use it in our docs
|
|
|
|
| |
and use it in all extension that need parsing bool config values.
|
|
|
| |
implemenation -> implementation
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
As we no longer support older python versions, importing
ElementTree is much simpler. The documented way for
extensions to use etree still remains the same.
|
| |
|
| |
|
|
|
|
| |
They are span elements. `<del>` is explicitly mentioned as such in the [markdown syntax document](http://daringfireball.net/projects/markdown/syntax)
|
| |
|
|
|
|
| |
uppears that we are loosing escaped backslashes (both in the href and in the link label in the example given in issue 14.
|
| |
|
|
|
|
| |
tree, but it still uses ElementTree Comment assinged to a node's tag to test for Comment nodes. Also no longer considering Commet nodes to be block level.
|
|
|
|
| |
longer crash on other non-string ElemetTree tags (like processing instructions).
|
|
|
|
| |
third party extensions when using cElementTree.
|
| |
|
|
|
|
| |
if you need it.
|
| |
|
|
|
|
| |
markdown/__init__.py
|
|
|
|
| |
fixed imports. We import logging levels from logging directly and only import message from md_logging.
|
|
|