| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ |
|
| |
|
| |
|
|
|
|
|
| |
I've decided to go with longer lines in the tests. Also fixed a couple
errors with the previous cleanup.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|\
| |
| | |
Issue #368: Fix Markdown in raw HTML stops working
|
| |
| |
| |
| |
| |
| |
| | |
Originally there was an infinite loop issue that was patched in issue
#308. Unfortunately, it was fixed all the way. This fix patches the
infinite loop fix to only add an offset to the `right_listindex` when
it is in a infinite loop scenario.
|
|\|
| |
| | |
Fix issue #365 and #366
|
| |
| |
| |
| |
| |
| |
| |
| | |
This reworks the toc ordering to be done in a single pass with no
recursion. Very long documents with lots of headers can actually
exceed Python’s max recursion limit. By handling the toc ordering with
no recursion, large documents can no longer cause toc to fail with
recursion erros.
|
|/
|
|
|
|
|
|
|
|
|
| |
The logic for the current regex for strong/em and em/strong was sound,
but the way it was implemented caused some unintended side effects.
Whether it is a quirk with regex in general or just with Python’s re
engine, I am not sure. Put basically `(\*|_){3}` causes issues with
nested bold/italic. So, allowing the group to be defined, and then
using the group number to specify the remaining sequential chars is a
better way that works more reliably `(\*|_)\2{2}. Test from issue #365
was also added to check for this case in the future.
|
|
|
|
| |
Fixes #361.
|
|
|
| |
Fixes #359. Thanks for the report @gremmie.
|
|\
| |
| | |
Changed logging level when loading extensions
|
|/
|
| |
So it suppresses messages for loaded extensions when its used as third party.
|
|\
| |
| | |
Fix tail out of order issue
|
|/
|
|
|
|
|
|
|
|
|
|
| |
This issue was discovered when dealing with nested inlines. In
treeprocessors.py it was incorrectly handling tails. In short, tail
elements were being inserted earlier than they were supposed to be.
In order to fix this, the insertion index should be incremented by 1 so
that when the tails are inserted into the parent, they will be just
after the child they came from.
Also added a test in nested-patterns to catch this issue.
|
|\
| |
| | |
Use Pygments API
|
|/ |
|
|
|
|
| |
Also removed an inacurate statement in the 2.5 release notes.
|
|
|
|
| |
Fixes #343. Thanks for the report @AlexJF.
|
|
|
|
|
|
|
|
|
| |
Fixes #253. Thanks to @facelessuser for the tests. Although I removed
a bunch of weird ones (even some that passed) from his PR (#342). For
the most part, there is no definitive way for those to be parsed. So
there is no point of testing for them. In most of those situations,
authors should be mixing underscores and astericks so it is clear
what is intended.
|
|
|
|
|
|
| |
See #253. Prior to this patch, if any inline processors returned an element
with a tail, the tail would end up empty. This resolves that issue and will
allow for #253 to be fixed. Thanks to @facelessuser for the work on this.
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we chnaged the order in import trys for short names extensions
(no dot syntax), an extra test was added to the import code for the
occassion when a naming conflict exists. For example, if PyTables
is installed (module name is tables) and the user tries to use
the short name 'tables' instead of 'markdown.extensions.tables'.
Fixes #341.
Of course, this code will get ripped out when the old behavior is
fully deprecated.
|
|
|
|
|
|
| |
The new option parser assumes bool values if the default is bool or
None. As the "title" option is not a bool value, it should default to an
empty string rather than None. Fixes #347.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #340. The "inline" TreeProcessor runs before the "prettify"
TreeProcessor, but the "smarty" TreeProcessor (wich is just another
instance of `InlineProcessor`) runs after the "prettify" TreeProcessor.
The problem was that the "prettify" TreeProcessor was losing the
AtomicString quality of the text of code blocks (any operation
on a string creates a new string. When that string is an AtomicString,
the new string must explicitly be declared as an AtomicString.
As the "prettify" TreeProcessor cleans up newlines on code blocks,
it was changing the AtomicString to a normal string. And as
`InlineProcessor` identifies what elements to skip solely by whether
the text is an AtomicString, the "smarty" instance was running on
code blocks.
Importantly, I added a test of code blocks and spans for smarty,
so this shouldn't break again.
|
|
|
|
|
| |
Both `safe_mode` and `html_replacement_test` keywords are
pending deprecation, as are positional args. Closes #337.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The builtin extensions will no longer get special treatment and have
the path ("markdown.extensions.") appended . The same applies for
"mdx_" extensions. All names extension must provide the full path.
Fixes #336.
Also deprecating support for passing in extension config settings
as part of the string name. The extension_configs keyword should
be used instead. Fixes #335.
Also raising PendingDeprecationWarnings for positional args or the
"config" keyword on the Extension Class. Pass each setting as a
seperate keyword instead.
Docs and tests are updated. Still need to update extension API docs.
|
|
|
|
|
| |
This is in anticipation of #335. The reference and extension api docs still
need to be updated, but that will happen with change in the code.
|
|
|
|
|
| |
`'path.to.module(option=value'` => `path.to.module.Class(option='value')`
This is in anticipation of #335
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The last few extensions were updated to accept dicts/**kwargs as configs and more
tests were updated. Also updated extra to actually accept configs.
Note that extra requires an extra level of dicts. First you need
to indicate tha the settings are for extra, then, which extension
extra wraps. I'm not crazy abount this, bit not sur ehow else to do it
without making all the configs a global attribute on the Markdown class
to that any extention can access any other extensions config settings.
I don't think we wnat to do that.
Also updated extra to use dot notation for the sub-extensions.
|
|
|
|
|
|
| |
Except were "short names" are explained in the docs, all references
to the buitlin extensions now use `markdown.extensions.*` in
anticipation of #336.
|
|
|
|
|
|
|
|
|
|
| |
All named extensions now use python dot notation in the tests - including
all builtin extensions (eg: 'extra' => 'markdown.extensions.extra'). This
is in anticipation of #336.
Note there are a few tests (in the error tests) that will still need
updating, but not till we make the change as they will test for the
new error message.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This needs to work with the JSON lib if PyYaml isn't available.
Therefore, we can't catch a yaml specific exception.
The tests are fine using a yaml specific exception as the yaml lib
is required by the testing framework anyway. So yaml is always
available when running the tests.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If you were to import the class like this:
from path.to.module import SomeExtensionClass
Then the named extension would be the string:
"path.to.module:SomeExtensionClass"
This should simplify loading extensions from the command line or
template filters -- expecially when multiple extensions are defined
in a single python module.
The docs still need updating. I'm waiting to update the docs after
implementing #335 and #336 as that will require a major refactor of
that section of the docs anyway.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
We now use importlib which means we no longer support Python 2.6.
Also, this refactor properly imports third party extensions which reside
at the root of PYTHONPATH. Previously, either `markdown.extensions.` or
`mdx_` would be appended to any extension name that did not contain a
dot, which required third party extensions to either be in submodules or
use the old `mdx_` naming convention.
This commit is also in preperation for #336. It will now be much easier to
deprecate (and later remove) support for the old ways of handling extension
names.
|
|
|
|
|
|
| |
These couple lines were from an old - no longer used - method of
stashing inlines. There is no need for it today. The if statement would
never evaluate True.
|
|
|
|
|
|
|
|
|
| |
markdown/inlinepatterns.py is now at 99% coverage.
I have no idea why the two remaining lines are not not covered.
I it not clear to me under what circumstances this two if statements
would ever evaluate to True. I'm inclined to just remove them, but perhaps
there is an edge case I'm missing. I'll take another look later.
|
|
|
|
|
| |
A couple scenarios with "None" were previously not accounted for.
Also updated tests which guives us 100% for markdown/util.py
|
|
|
|
| |
This should give us 100% coverage of postprocessors.py.
|
| |
|
| |
|