`, ``, `
`, ``, ``, ``, ``, ``, ``.
Inside ``, wiki syntax is preserved as literal text. Indented code and `` content render as fenced code blocks, even for a single line. `` stays inline unless its content contains a newline.
## Using the parser directly
```ruby
parser = Markbridge::Parsers::MediaWiki::Parser.new
ast = parser.parse("== Section ==\n* one\n* two")
renderer = Markbridge::Renderers::Discourse::Renderer.new
renderer.render(ast)
# => "## Section\n\n- one\n- two"
```
MediaWiki’s block syntax is fixed — there’s no handler registry for headings, lists, tables, etc. Inline HTML-like tags (``, ``, ``, etc.) go through an `InlineTagRegistry` you can customize via the `handlers:` kwarg:
```ruby
registry = Markbridge::Parsers::MediaWiki::InlineTagRegistry.default
registry.register("custom", :raw, MyCustomNode)
Markbridge.mediawiki_to_markdown(input, handlers: registry)
```
`type` is one of `:raw` (content preserved verbatim, not re-parsed), `:formatting` (content re-parsed), or `:self_closing` (leaf with no content).
For block-level customization, transform the AST after parsing, or register a different renderer tag via [`Markbridge.discourse_renderer(tags:)`](/customization/customizing-renderer/).
## Limitations
The parser targets the bulk of content you’ll see in wiki exports, not the full MediaWiki specification:
* **No templates** (`{{Template}}`). They’re passed through as literal text.
* **No magic words or parser functions** (`__NOTOC__`, `{{#if:}}`, etc.).
* **Categories and file embeds** are not translated to Discourse equivalents.
* **Reference footnotes** (`[`) are not special-cased.
If your export relies on these, pre-process before handing it to Markbridge, or post-process the AST.]