wiki:MarkdownMacro

Markdown WikiProcessor Macro Implementation

Notice: This plugin is unmaintained and available for adoption.

Description

This macro implements John Gruber's Markdown lightweight plain text-to-HTML formatting syntax as a wiki processor macro.

Example of its usage:

{{{#!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").

A table:

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell
}}}

Alternatively, enabling the MarkdownFormatter component will render wiki content as Markdown throughout Trac, without needing to wrap the text in a WikiProcessor. See installation for details.

See also:

Bugs/Feature Requests

Existing bugs and feature requests for MarkdownMacro are here.

If you have any issues, create a new ticket.

defect

6 / 9

enhancement

2 / 3

Download

Download the zipped source from here.

The plugin is also available on PyPI.

Source

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

Installation

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

General instructions on installing Trac plugins can be found on the TracPlugins page.

Enable the macro in your trac.ini file:

[components]
tracmarkdown.macro.markdownformatter = disabled
tracmarkdown.macro.markdownmacro = enabled

If you want to use markdown without wrapping the text in a WikiProcessor:

[components]
tracmarkdown.macro.markdownformatter = enabled
tracmarkdown.macro.markdownmacro = disabled

The markdownformatter and markdownmacro components are mutually exclusive and should not be both enabled.

Recent Changes

18170 by Cinc-th on 2021-04-09 09:22:41
MarkdownMacro: minor Python 3 fix. Bumped version to 0.11.10. Added more classifiers to setup.py.
18014 by rjollos on 2021-02-24 22:14:13
TracMarkdownMacro 0.11.9dev: Fix incorrect type for option

Refs #13961.

17937 by rjollos on 2020-12-11 22:03:11
TracMarkdownMacro 0.11.9dev: Add Markdown to install reqs
(more)

Author/Contributors

Author: dwclifton (Macro/Processor package, setup, documentation)
Maintainer: none (needsadoption)
Contributors:

Last modified 3 days ago Last modified on Apr 9, 2021, 7:19:30 PM