build(aio): implement the remark renderer

The implementation adds three plugins to the remark processor:

* remove support for code blocks triggered by indented
text - only gfm triple backticks are supported; and also adds support for
dgeni inline tags.

* ignore content within `code-example` and `code-tabs` elements. This prevents
the content being accidentally treated as markdown

* ignore dgeni inline tags, e.g. `{@link ... }` to prevent the content of
the links from being accidentally treated as markdown
This commit is contained in:
Peter Bacon Darwin
2017-04-11 18:24:08 +01:00
committed by Igor Minar
parent 540581da3e
commit 374bf1ed98
6 changed files with 659 additions and 5 deletions

View File

@ -0,0 +1,9 @@
var Package = require('dgeni').Package;
/**
* @dgPackage remark
* @description Overrides the renderMarkdown service with an implementation based on remark
*/
module.exports = new Package('remark', ['nunjucks'])
.factory(require('./services/renderMarkdown'));