开发者

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):

Lightweight Markup Language for Icons

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜