model: add optional MDoc::original_mentity

Signed-off-by: Jean Privat <jean@pryen.org>
modelbuilder: build MDoc of MGroup from README files

This is a crazy idea form lunch-time; let's see if it catches.

Signed-off-by: Jean Privat <jean@pryen.org>
markdown: trim indenting spaces from code-blocks in MDoc

So there is no more useless margin if code block is indented with 6 or more
spaces.

Signed-off-by: Jean Privat <jean@pryen.org>
markdown: code-block is detected with 3 spaces

So a total of 4 including the space that follows the #

Signed-off-by: Jean Privat <jean@pryen.org>
highlight: "display: block" and "line" only make sense in <pre> tags

Signed-off-by: Jean Privat <jean@pryen.org>
highlight: factorizes css and js requirements

Signed-off-by: Jean Privat <jean@pryen.org>
highlight: do not add html classes to unresolved local variables

Eg. this avoid highlighting to only highlight the fist occurrence of `x`
in the following AST if no semantic analysis is run

~~~
var x = 5
print x
~~~

Now, either none, or both `x` are identified as variables according to how
mush semantic analysis is performed.


Signed-off-by: Jean Privat <jean@pryen.org>
test_markdown: use more css and js from highlight

Signed-off-by: Jean Privat <jean@pryen.org>
test_markdown: rewrite core method

Because used services are in the model

Signed-off-by: Jean Privat <jean@pryen.org>
test_markdown: --full also document projects and groups

Currently, there is no way to document projects, but groups have the new
`README` feature

Signed-off-by: Jean Privat <jean@pryen.org>
test_markdown: refine href in MEntities to match the generated HTML

I am not sure this is the way to go ; maybe, a better API could be
to have to kind of double dispatch between the Higliter and the MEntity
so that a specific highliting behavior could be done by creating a subclass
of HighlightVisitor.

Signed-off-by: Jean Privat <jean@pryen.org>
tests: update test_markdown

Signed-off-by: Jean Privat <jean@pryen.org>
Merge: Improve mdoc & markdown

Various small improvement on the mdoc and markdown side

more important stuff in no particular order:
* MDoc::original_mentity gives context
* README documents mgroups
* markdown need 4 spaces (not 5) for code-block and trims them
* most parts of test_markdown are refreshed

See examples in http://nitlanguage.org/code/test-markdown.html ; it just lists entities in an <h?> tag followed by its documentation

Pull-Request: #477
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>