From: Waylan L. <wa...@gm...> - 2011-03-02 17:24:40
|
Brian, Glad you have found Python-Markdown useful. Of course, we try to support Markdown as close as possible, so we won't be implementing your request as a built in feature. In fact, for those of us who prefer command line text editors (vim or emacs) Markdown's default behavior with line breaks makes much more sense. However, in a web form, I can see the value in making all line breaks hard. This would be a super simple extension. I'm not aware that one already exists, but you could easily replace the current line break inline pattern with your own. In fact, you'd really only need to write the appropriate regex and pass it in using our extension API. See the docs for all the details [1]. Given the simplicity of something like this, my tutorials [2] [3] might be more helpful. If you need any help, feel free to ask. And when you have a working extension, please post a link to it on our wiki [4] so others may use it. [1]: http://www.freewisdom.org/projects/python-markdown/Writing_Extensions [2]: http://achinghead.com/archive/86/python-markdown-adding-insert-delete/ [3]: http://achinghead.com/archive/87/python-markdown-changing-bold-italics/ [4]: http://www.freewisdom.org/projects/python-markdown/Available_Extensions On Tue, Mar 1, 2011 at 4:50 PM, Brian Neal <bg...@gm...> wrote: > Hi - > > First of all, thanks for your great work on this package. It is really useful. > > My users are easily confused and get tripped up by the way Markdown > does not insert a <br /> tag when it encounters a newline in a > paragraph-like construct. So I'm searching for a way to implement this > behavior, just like StackOverflow and GitHub Flavored Markdown do: > http://github.github.com/github-flavored-markdown/ > > Has this been done by anyone before? If not, what is the best way to > do this, as an extension? Any pointers on how to best do that? As a > preprocessor or tree extension? > > Or is there already a Python implementation of GitHub flavored Markdown? > > Thanks, > BN > > ------------------------------------------------------------------------------ > Free Software Download: Index, Search & Analyze Logs and other IT data in > Real-Time with Splunk. Collect, index and harness all the fast moving IT data > generated by your applications, servers and devices whether physical, virtual > or in the cloud. Deliver compliance at lower cost and gain new business > insights. http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg |