faml – A Markup Language for browsers and node.js

A common request on many websites is to offer some light formatting capability for a user: Bold, Italic, Links, maybe lists. It should not clutter the markup too much and allow little room for error.

John Gruber's Markdown is one of the most popular markup languages, but it has a few features that I commonly need to tweak or remove altogether. For my needs, I have customized a Markdown parser to remove features (recently the excellent stmd.js), but I've just decided to create a little markup language of my own:

faml - A Markup Language

The syntax may be inspired by Markdown, but it is really its own thing. I only included the things I need, and there is generally just one way of doing things (e.g., emphasis is added through asterisks). The code is based on stmd.js but heavily changed and broken up differently.

You can check out the source, documentation and JavaScript files on GitHub or play with it in the browser. It is also published to npm, allowing you to just npm install faml. I have example code for web browsers and for node.js.

The current version is 0.9 because I'm still working things like the tree that the parser returns (it contains a bunch of unneccessary stuff), adding tests, and giving it a nice homepage.

But it's there for people to play with 🙂

var parser = new faml.FamlParser();
var renderer = new faml.FamlRenderer();
var input = "test *with emph*";
var parsed = parser.parse(input);
var rendered = renderer.render(parsed);