Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Wiki {{diagram}} code  (Read 682 times)

mixtrak

  • Guest
Wiki {{diagram}} code
« on: March 22, 2017, 07:53:32 pm »

Hi all. What's going on under the hood to render the {{diagram}}{{/diagram}} template markup in the wiki? How would one approach porting this to Pandoc Markdown so it renders on GitHub?
Logged

BenLubar

  • Bay Watcher
  • [BODY:HUMANOID_LEGLESS_6ARMS]
    • View Profile
Re: Wiki {{diagram}} code
« Reply #1 on: March 25, 2017, 08:24:42 pm »

Since Markdown doesn't support colors, your best bet is either to make an image or to use a Markdown fenced code block:

Code: [Select]
```
some diagram stuff
```
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Wiki {{diagram}} code
« Reply #2 on: March 27, 2017, 10:55:09 am »

The {{diagram}} template generates a table, with one cell for each character. The <diagram> tag produces a similar table, but is implemented by an extension instead, so it can support a few more features. (Well, the template could, in theory, but it would be a lot harder to maintain.)

There is a wiki subforum that could work for these types of questions too, by the way. I typically look at that more often than this subforum.

BenLubar's suggestions are probably your best bet, unless that's a special Markdown dialect that does support colors.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.