aboutsummaryrefslogtreecommitdiffstats
path: root/markdown.py
Commit message (Collapse)AuthorAgeFilesLines
* Allow markdown.py script to run on Windows - stop it from importing itself ↵Waylan Limberg2009-03-161-0/+11
| | | | instead of the library. Note that this only works if the markdown library is installed (mostly likely in sitepackages). It will not work if the markdown library is in the same directory as markdown.py (such as an uninstalled source distribution).
* Fixed imports so logging works in commandline script.Waylan Limberg2008-12-071-3/+5
|
* Refactoring test and getting logging to work properly when etree fails to load.Yuri Takhteyev2008-12-071-0/+5
|
* Fixed BlockParser to parse code blocks nested in list items and added a ↵Waylan Limberg2008-11-181-0/+0
| | | | test. Somehow we never had a test for that before. Also reset markdown.py to be executable again.
* More refactoring.Yuri Takhteyev2008-11-181-0/+29
|
* Attempting a refactoring, breaking markdown into multiple files.Yuri Takhteyev2008-11-171-2249/+2
|
* Fixed a bug in loadextension where a nonexistant extention would crash ↵Waylan Limberg2008-11-131-11/+8
| | | | rather than generate the appropriate error message and continue.
* Fixed BlockquoteProcessor to acknowledge blocks in which the blockquote ↵Waylan Limberg2008-11-131-5/+12
| | | | starts after the first line. Also updated coresponding test as it had an error and added more detail. All core tests pass now. On to extensions.
* Replaced all uses of 4 spaces with TAB_LENGTH in BlockParser.Waylan Limberg2008-11-131-8/+8
|
* Made significant improvments to comments and docstrings in BlockParser. Also ↵Waylan Limberg2008-11-131-29/+186
| | | | renamed a few things to no longer use abbreviations.
* Fixed whitespace only line clearing and updated another test to match pl and ↵Waylan Limberg2008-11-131-1/+1
| | | | php output of lists. Only one test failing from core parser refactor now.
* Fixed core parser to differentiate between indented secondary lines of a ↵Waylan Limberg2008-11-131-2/+3
| | | | list item that are additional lines of the first p and child list items.
* Refactored core parser state to work with nested states.Waylan Limberg2008-11-131-9/+23
|
* Fixed a streange anomily in whitespace a start of p and li tags. Mostly odd ↵Waylan Limberg2008-11-131-2/+2
| | | | tests corrected.
* Fixed funky-list (a ul with child ol items is still an ul and visa-versa). ↵Waylan Limberg2008-11-131-3/+4
| | | | Weird, but it matchs pl and php implementations.
* Fixed various issues with the core parser - mostly whitespace related and ↵Waylan Limberg2008-11-131-31/+81
| | | | updated a few tests that weren't quite right - that is they now better match pl or php implementations.
* Replaced old core parser with new BlockParser and copied old core into ↵Waylan Limberg2008-11-131-401/+240
| | | | extension.
* Fixed InlineProcessor to use the inlinePatterns on the Markdown instance ↵Waylan Limberg2008-11-051-6/+4
| | | | directly rather than a copied list of values set at init.
* Added definition list items (dt & dd) to html block elements.Waylan Limberg2008-11-041-1/+1
|
* Replaced Treap with OrderedDict. Updated regression_tests and extensions. ↵Waylan Limberg2008-10-281-168/+188
| | | | All tests pass. Still needs documentation.
* Combined the TextPreprocessors and Preprocessors into Preprocessors. Updated ↵Waylan Limberg2008-10-201-34/+7
| | | | extensions and docs as well.
* Cleaned up some commented code from previous commit and added Jack Miller to ↵Waylan Limberg2008-10-191-15/+0
| | | | docs/AUTHORS for his toc extension.
* Made InlineProcessor a TreeProcessor. Now an extension can manipulate the ↵Waylan Limberg2008-10-191-285/+281
| | | | tree either before or after InlinePatterns are run. Updated docs as well. This change should not affect existing extensions.
* Changed Postprocessors to Treeprocessors and TextPostProcessors to ↵Waylan Limberg2008-10-191-27/+28
| | | | Postprocessors. These names more acturately depict what things do. Also updated the extensions and docs to match.
* Made third argument of Treap.add function optional.Artem Yunusov2008-10-161-46/+30
|
* Fixed the url sanitation after recent refactor. All tests pass now.Waylan Limberg2008-10-131-5/+6
|
* Fixing the footnotes extension and corresponding fixes to markdown.py.Yuri Takhteyev2008-10-131-7/+7
|
* Fixed command-line handling.Yuri Takhteyev2008-10-131-8/+5
|
* Incorporated Ben Wilson's Treap implementation.Yuri Takhteyev2008-10-121-123/+253
| | | | | | | Pre-processors, post-processors, patterns, etc. are now all stored in Treaps. We can then insert items between them with code like this: markdown.inlinePatterns.add("foo", FooPattern(), "<strong")
* Made private methods actually private (to keep us honest) and removedYuri Takhteyev2008-10-121-453/+427
| | | | unnecessary whitespace.
* Refactored markdown tree traversing logic into a separate classYuri Takhteyev2008-10-121-202/+189
| | | | (InlineProcessor).
* More cleanup. Refactored all the core parsing logic into a separateYuri Takhteyev2008-10-121-598/+620
| | | | class: MarkdownParser.
* More cleanup.Yuri Takhteyev2008-10-071-68/+34
|
* All sorts of cleanup.Yuri Takhteyev2008-10-071-396/+291
| | | | | | The bigger changes include getting rid of old BOM-removal logic and getting rid of BlockGuru. Most of the changes are just re-ordering of functions, removal of whitespace, adding comments, etc.
* Changing logging per Michael Bayer's suggestion.Yuri Takhteyev2008-10-061-55/+58
|
* Checking if logger level is set before changing it.Yuri Takhteyev2008-10-061-2/+3
|
* Fixed stupid mistake in previous commit.Waylan Limberg2008-09-041-1/+1
|
* Moved prettifyETree into a Postprocessor and added code to append all '<br ↵Waylan Limberg2008-09-041-25/+40
| | | | />' tags with a linebreak. Also fixed a minor bug were the '<br />' tags contained 2 spaces instead of one before the slash (i.e. '<br />'). Note that by moving to a Postprocessor, anyone can override with their own code which does what they want (i.e. add indentation) with the extension api.
* Refactor inline placeholders and use strings of random chars for placeholders.Waylan Limberg2008-09-031-19/+12
|
* Replaced indentation with linebreaks only. At least its more consistant - ↵Waylan Limberg2008-09-031-17/+15
| | | | and it better matches other markdown implementations. Also updated tests.
* Comments updates.splyer2008-08-241-28/+7
|
* more_comments test works fine now.Artem Yunusov2008-08-241-1/+2
|
* isBlockLevel function and HtmlBlockPreprocessor changed. more_comments test ↵Artem Yunusov2008-08-241-10/+11
| | | | works fine now.
* Fixed some bugs concerning HTML, test extended and works.Artem Yunusov2008-08-241-5/+23
|
* Fixed Ticket 11. Disabled ``indenteTree`` for `pre` and `code` tags. NowWaylan Limberg2008-08-221-1/+1
| | | | | | | | | whitespace is preserved in codeblocks. As a side-benefit, this also solved the issue with the safe-mode tests failing. All tests incorectly altered at ElementTree conversion have been corrected for this bug. Any remaining tests that fail are unrelated to this.
* Improved past commit - treated safe raw html properly.Waylan Limberg2008-08-221-2/+1
|
* Added special case for raw html in safe-mode. The escaped/replaced html is ↵Waylan Limberg2008-08-221-2/+3
| | | | now wrapped in <p> tags so we have valid html.
* Merge branch 'master' of git@gitorious.org:python-markdown/mainlineWaylan Limberg2008-08-221-19/+7
|\
| * Added check for AtomicStrinc instead of ['code', 'pre'] check, deleted some ↵Artem Yunusov2008-08-231-19/+7
| | | | | | | | commented code lines.
* | Fixed Ticket 13. Raw block-level html are no longer being inserted into <p> ↵Waylan Limberg2008-08-221-1/+1
|/ | | | | | | | | | | | | tags. Also edited numerious tests that were expecting wrong output - they now expect correct output. Note that a few **still fail** because the output before moving to ELementTree wasn't correct either. So I set the expected output to what I think it should be so we don't forget about it later. I should also note that the 'safe-mode' tests are failing. However, I believe the current expected output is correct as it is valid html. Interestingly, these tests passed prior to this fix. We'll need to special case safe-mode here.