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?
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):
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!
You could do it with reStructuredText by adding some "custom interpreted text roles" but if all you want to do it choose icons, you're probably better off with a custom "domain specific language". How you'd do it is very dependent on the environment you want to use though.
精彩评论