diff options
author | Waylan Limberg <waylan.limberg@icloud.com> | 2015-03-29 23:00:30 -0400 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2018-07-24 11:40:13 -0400 |
commit | ee54678185234f01d3de6a6334f30c9bb3417783 (patch) | |
tree | d72e6bde812a59b6615b1b33ef878263ed6f5cc7 /markdown/treeprocessors.py | |
parent | 727adc8a053402d3e9a38424ff67bde697674156 (diff) | |
download | markdown-ee54678185234f01d3de6a6334f30c9bb3417783.tar.gz markdown-ee54678185234f01d3de6a6334f30c9bb3417783.tar.bz2 markdown-ee54678185234f01d3de6a6334f30c9bb3417783.zip |
Moved enable_attributes keyword to extension: legacy_attrs.
If you have existing documents that use the legacy attributes format,
then you should enable the legacy_attrs extension for those documents.
Everyone is encouraged to use the attr_list extension going forward.
Closes #643. Work adapted from 0005d7a of the md3 branch.
Diffstat (limited to 'markdown/treeprocessors.py')
-rw-r--r-- | markdown/treeprocessors.py | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/markdown/treeprocessors.py b/markdown/treeprocessors.py index 7c37ae7..df5e748 100644 --- a/markdown/treeprocessors.py +++ b/markdown/treeprocessors.py @@ -366,26 +366,9 @@ class InlineProcessor(Treeprocessor): stack.append((child, self.ancestors[:])) for element, lst in insertQueue: - if self.markdown.enable_attributes: - if element.text and isString(element.text): - element.text = inlinepatterns.handleAttributes( - element.text, element - ) - i = 0 - for obj in lst: + for i, obj in enumerate(lst): newChild = obj[0] - if self.markdown.enable_attributes: - # Processing attributes - if newChild.tail and isString(newChild.tail): - newChild.tail = inlinepatterns.handleAttributes( - newChild.tail, element - ) - if newChild.text and isString(newChild.text): - newChild.text = inlinepatterns.handleAttributes( - newChild.text, newChild - ) element.insert(i, newChild) - i += 1 return tree |