Search code examples
javascripticonsmarkup

Lightweight Markup Language for Icons


Lightweight markup languages are very convenient for hyperlinks and images. But what I am looking for is a language that would help users display icons or smileys on a page (for example on a dashboard).

For example, "flag:red" would display... a red flag. "Light:green" would display a green traffic light. The icons could come from an image library, unicode symbols, or maybe a graphic library.

Does such a language exist?


Solution

  • Github implemented something similar to this for their markup. You'd write :cake: and get this (in scale with the rest of the text, mind you):

    teh cake is a lie

    Unfortunately, the implementation is not open-source. However, your idea works great. Implement a simple parser in your language of choice, come up with a rigid syntax and an image library, and go to town!