wiki:MarkdownMacro

Version 15 (modified by Ryan J Ollos, 11 years ago) (diff)

Now hosted in t-h.o.

Markdown WikiProcessor Macro Implementation

Description

The MarkdownMacro package implements John Gruber's Markdown lightweight plain text-to-HTML formatting syntax as a WikiProcessor macro. The original code is courtesy of Alex Mizrahi aka killer_storm. I simply added a little robustness to the error checking, documented the package, created setup.py and this README, and registered it with Trac Hacks.

Bugs/Feature Requests

Existing bugs and feature requests for MarkdownMacro are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from [download:markdownmacro here].

Source

You can check out WikiSearchMacro from here using Subversion, or browse the source with Trac.

Installation

First you need to install Python Markdown. Follow the instructions on the Web site.

Proceed to install the plugin as described in t:TracPlugins.

Enable the macro in trac.ini:

[components]
Markdown.* = enabled

You may have to restart your Web server.

Example

{{{
#!Markdown

# RGB

+ Red
+ Green
+ Blue

## Source Code

    from trac.core import *
    from trac.wiki.macros import WikiMacroBase
    from trac.wiki.formatter import Formatter

An example [link](http://example.com/ "With a Title").
}}}

See Also

Recent Changes

18423 by Cinc-th on 2021-06-03 08:23:45
MarkdownMacro: use Markdown < 3.2 install requirement only for Python 2. For Python 3 (Trac >1.4.x) any release will do.
18422 by Cinc-th on 2021-06-02 06:02:38
MarkdownMacro: removed debug print statement.
18417 by Cinc-th on 2021-06-01 10:33:33
MarkdownMacro: new preview renderer for *.md files. To render README.md und Install.md properly change the following in trac.ini.

[mimeviewer]
mime_map_patterns = text/plain:README(?!(\.md|\.rst))|INSTALL(\.md|\.rst)|COPYING.*

Closes #11743

(more)

Author/Contributors

Attachments (1)

Download all attachments as: .zip