From: Ron G. <ro...@fl...> - 2009-02-12 01:12:30
|
Hi, What is the current state of the wikilinks extension? I've tried to get it to work with both 1.7 and 2.0 without success. In 2.0 the extension seems to load OK, but it doesn't actually work: Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import markdown >>> markdown.markdown('# Test\nWikiLinkTest', ['wikilinks']) u'<h1>Test</h1>\n<p>WikiLinkTest</p>' >>> markdown.version_info (2, 0, 0, 'beta-2') Am I doing something wrong, or are wikilinks known to not be working? Thanks, rg |
From: Waylan L. <wa...@gm...> - 2009-02-12 03:03:03
|
The old "wikilink" (note no "s") has been abandoned and a new "wikilinks" extension has replaced it. The new extension uses ``[[bracketed links]]`` rather than ``CamelCase`` links. There are various reasons why, which were discussed in the archives. The difference is documented in the source code, but no where else yet. Of course, when we release 2.0, the website will be updated. Until then, the website will continue to document 1.7. The old 1.7 version can be found here in the repo: http://gitorious.org/projects/python-markdown/repos/mainline/blobs/bcc437814eb90c60120d0e7a9c1ece85bf66aea3/mdx_wikilink.py or http://tinyurl.com/c5kb7t On Wed, Feb 11, 2009 at 8:12 PM, Ron Garret <ro...@fl...> wrote: > Hi, > > What is the current state of the wikilinks extension? I've tried to > get it to work with both 1.7 and 2.0 without success. In 2.0 the > extension seems to load OK, but it doesn't actually work: > > Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import markdown > >>> markdown.markdown('# Test\nWikiLinkTest', ['wikilinks']) > u'<h1>Test</h1>\n<p>WikiLinkTest</p>' > >>> markdown.version_info > (2, 0, 0, 'beta-2') > > Am I doing something wrong, or are wikilinks known to not be working? > > Thanks, > rg > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg |
From: Ron G. <ro...@fl...> - 2009-02-12 03:18:28
|
OK, thanks. Is there any projection on when 2.0 will be released? rg On Feb 11, 2009, at 7:02 PM, Waylan Limberg wrote: > The old "wikilink" (note no "s") has been abandoned and a new > "wikilinks" extension has replaced it. The new extension uses > ``[[bracketed links]]`` rather than ``CamelCase`` links. There are > various reasons why, which were discussed in the archives. > > The difference is documented in the source code, but no where else > yet. Of course, when we release 2.0, the website will be updated. > Until then, the website will continue to document 1.7. > > The old 1.7 version can be found here in the repo: > > http://gitorious.org/projects/python-markdown/repos/mainline/blobs/bcc437814eb90c60120d0e7a9c1ece85bf66aea3/mdx_wikilink.py > > or http://tinyurl.com/c5kb7t > > On Wed, Feb 11, 2009 at 8:12 PM, Ron Garret <ro...@fl...> wrote: >> Hi, >> >> What is the current state of the wikilinks extension? I've tried to >> get it to work with both 1.7 and 2.0 without success. In 2.0 the >> extension seems to load OK, but it doesn't actually work: >> >> Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) >> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin >> Type "help", "copyright", "credits" or "license" for more >> information. >>>>> import markdown >>>>> markdown.markdown('# Test\nWikiLinkTest', ['wikilinks']) >> u'<h1>Test</h1>\n<p>WikiLinkTest</p>' >>>>> markdown.version_info >> (2, 0, 0, 'beta-2') >> >> Am I doing something wrong, or are wikilinks known to not be working? >> >> Thanks, >> rg >> >> >> ------------------------------------------------------------------------------ >> Create and Deploy Rich Internet Apps outside the browser with >> Adobe(R)AIR(TM) >> software. With Adobe AIR, Ajax developers can use existing skills >> and code to >> build responsive, highly engaging applications that combine the >> power of local >> resources and data with the reach of the web. Download the Adobe >> AIR SDK and >> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com >> _______________________________________________ >> Python-markdown-discuss mailing list >> Pyt...@li... >> https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss >> > > > > -- > ---- > \X/ /-\ `/ |_ /-\ |\| > Waylan Limberg |
From: Yuri T. <qar...@gm...> - 2009-02-12 03:34:52
|
> OK, thanks. Is there any projection on when 2.0 will be released? Good question. Do we have any outstanding issues? I had a plan of changing all the processors from run() to __call__(), but I've given up on this plan since. So, unless we have any specific bugs, we should just release it. - yuri -- http://spu.tnik.org/ |
From: Waylan L. <wa...@gm...> - 2009-02-12 05:21:50
|
On Wed, Feb 11, 2009 at 10:34 PM, Yuri Takhteyev <qar...@gm...> wrote: >> OK, thanks. Is there any projection on when 2.0 will be released? > > Good question. Do we have any outstanding issues? I had a plan of > changing all the processors from run() to __call__(), but I've given > up on this plan since. So, unless we have any specific bugs, we should > just release it. > I have two things on my list. Unfortunately, I haven't had time to work on anything lately. I have a solution for both (in my head), I just haven't implemented them yet. Once I do, I'll let everyone know. In case your wondering, the two items are: 1. Lists currently only nest one level with the new core - interestingly no tests were checking deeper than that so I didn't catch it right way. This is a *must have* IMO, so we need to wait for this before releasing. If ElementTree Elements had references to their parents this would be *a lot* easier. While I'm at it, I also have one minor change to the API for the blockprocessors in mind - so this needs to happen before we lock into 2.0. 2. The fenced_code_block extension needs some cleanup per discussion on the markdown list. This is a pretty simple adjustment to the regex and should be easy enough. Nice to have, but probably not a show-stopper. There is also some more documentation work to do. The important stuff is documented in the source and up-to-date (we'll copy it to the wiki when we release), but some of the extensions need their documentation updated (such as the new wikilinks ext). Again, not a show stopper. If someone wants to help out, patches are welcome adding docs for each extension to the repo based on what is currently in the wiki. -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg |
From: Ron G. <ro...@fl...> - 2009-02-14 03:22:42
|
I realize I'm a little late to the party, but is there a reason you didn't just construct an RE that matched CamelCase outside of links, and then run that at the very end? This nearly works: >>> re1 = re.compile(r'(?:<a .+?>.+?</a>.*?)*\b((?:[A-Z]+[a-z-_]+) {2,})\b') >>> re1.findall('<a href=ThisWontMatch>NeitherWillThis</a>ButThisWill') ['ButThisWill'] It falsely matches embedded CamelCase at the end of a string: >>> re1.findall('<a href=ThisWillMatchButItShouldnt>SoWillThis</a>') ['ThisWillMatchButItShouldnt', 'SoWillThis'] You can hack around this by appending a sentinal CamelCase string at the end to generate an extraneous match, and then just ignore that match. (There's probably a way to fix the RE to do the Right Thing but I'm not such a studly RE hacker.) rg On Feb 11, 2009, at 9:21 PM, Waylan Limberg wrote: > On Wed, Feb 11, 2009 at 10:34 PM, Yuri Takhteyev > <qar...@gm...> wrote: >>> OK, thanks. Is there any projection on when 2.0 will be released? >> >> Good question. Do we have any outstanding issues? I had a plan of >> changing all the processors from run() to __call__(), but I've given >> up on this plan since. So, unless we have any specific bugs, we >> should >> just release it. >> > > I have two things on my list. Unfortunately, I haven't had time to > work on anything lately. I have a solution for both (in my head), I > just haven't implemented them yet. Once I do, I'll let everyone know. > > In case your wondering, the two items are: > 1. Lists currently only nest one level with the new core - > interestingly no tests were checking deeper than that so I didn't > catch it right way. This is a *must have* IMO, so we need to wait for > this before releasing. If ElementTree Elements had references to their > parents this would be *a lot* easier. While I'm at it, I also have one > minor change to the API for the blockprocessors in mind - so this > needs to happen before we lock into 2.0. > > 2. The fenced_code_block extension needs some cleanup per discussion > on the markdown list. This is a pretty simple adjustment to the regex > and should be easy enough. Nice to have, but probably not a > show-stopper. > > There is also some more documentation work to do. The important stuff > is documented in the source and up-to-date (we'll copy it to the wiki > when we release), but some of the extensions need their documentation > updated (such as the new wikilinks ext). Again, not a show stopper. If > someone wants to help out, patches are welcome adding docs for each > extension to the repo based on what is currently in the wiki. > > -- > ---- > \X/ /-\ `/ |_ /-\ |\| > Waylan Limberg |
From: Waylan L. <wa...@gm...> - 2009-02-14 20:33:44
|
On Fri, Feb 13, 2009 at 8:47 PM, Ron Garret <ro...@fl...> wrote: > I realize I'm a little late to the party, but is there a reason you > didn't just construct an RE that matched CamelCase outside of links, > and then run that at the very end? Well, when the inline patterns are run, the document is an ElementTree Object. In other works, the html markup is not part of the text - so no that won't work. An to complicate matters, ElementTree Objects don't keep a reference to their parent - so we can't just check the parent. However, I suppose there isn't any reason why someone couldn't write a post-processor which did something like this. Although, it'll be fun getting it to ignore codeblocks and various other edge cases. That's the thing about CamelCase links. There's always going to be false positives. I've gotten the sense over the years that pretty much any serious system which has started out with them has either regretted it or abandoned them for this reason. But, for some situations, people like them, so if someone wants to write an extension, they are more than welcome. -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg |