A markdown parser for Nit.

Markdown documentation can be found in http://daringfireball.net/projects/markdown/. This parser is inspired by the famous TxtMark for Java (https://github.com/rjeschke/txtmark).

Usage

nitmd can be used as a standalone tool:

$ nitmd file.md

Or you can use it programmatically by importing the markdown module.

Differences with Markdown specification

This parser passes all tests inside http://daringfireball.net/projects/downloads/MarkdownTest_1.0_2007-05-09.tgz execpt of two:

  1. Images.text: fails because this parser doesn't produce empty 'title' image attributes.
  2. Literal quotes in titles.text: because markdown accepts unescaped quotes in titles and this is wrong.

Testing

The NitUnit test suite can be found in test_markdown.nit.

Minimalists tests are prefixed with process_*. All tests from daringfireball are prefixed with process_daring*.

Run the test suite:

$ nitunit lib/markdown/markdown.nit -t lib/markdown/test_markdown.nit

All subgroups and modules

group bin

markdown > bin

module decorators

markdown :: decorators

Decorators for markdown parsing.
group man

markdown > man

module man

markdown :: man

Simple groff decorator restricted for manpages.
module markdown

markdown :: markdown

Markdown parsing.
module nitmd

markdown :: nitmd

A Markdown parser for Nit.
package_diagram markdown\> markdown template template markdown\>->template config config markdown\>->config core core template->core ini ini config->ini opts opts config->opts ...core ... ...core->core ...ini ... ...ini->ini ...opts ... ...opts->opts nitc\>doc\>commands\> commands nitc\>doc\>commands\>->markdown\> nitc\>doc\>templates\> templates nitc\>doc\>templates\>->markdown\> nitc\>doc\>templates\>->nitc\>doc\>commands\> nitc nitc nitc->nitc\>doc\>commands\> nitc\>doc\>api\> api nitc\>doc\>api\>->nitc\>doc\>commands\> nitc\>doc\>term\> term nitc\>doc\>term\>->nitc\>doc\>commands\> nitc... ... nitc...->nitc nitc\>doc\>api\>... ... nitc\>doc\>api\>...->nitc\>doc\>api\> nitc\>doc\>templates\>... ... nitc\>doc\>templates\>...->nitc\>doc\>templates\> nitc\>doc\>term\>... ... nitc\>doc\>term\>...->nitc\>doc\>term\>

Ancestors

group codecs

core > codecs

Group module for all codec-related manipulations
group collection

core > collection

This module define several collection classes.
group core

core

Nit common library of core classes and methods
group ini

ini

ini - Read and write INI configuration files
group opts

opts

Management of options on the command line
group text

core > text

All the classes and methods related to the manipulation of text entities

Parents

group config

config

Configuration options for nit tools and apps
group template

template

Basic template system

Children

Descendants

group api

nitc > doc > api

Components required to build a web server about the nit model.
group catalog

nitc > catalog

Basic catalog generator for Nit packages
group compiler

nitc > compiler

Compilation to C
group compiler_ffi

nitc > compiler > compiler_ffi

Full FFI support for the compiler
group doc

nitc > doc

group dynamic_loading_ffi

nitc > interpreter > dynamic_loading_ffi

This group implement a partial support for the Nit FFI in the interpreter.
group ffi

nitc > ffi

Full FFI support, independent of the compiler
group frontend

nitc > frontend

Collect and orchestration of main frontend phases
group interpreter

nitc > interpreter

Interpretation of Nit programs
group metrics

nitc > metrics

Various statistics about Nit models and programs
group model

nitc > model

The meta model of Nit programs
group modelize

nitc > modelize

Create a model from nit source files
group nitc

nitc

Nit compiler and tools
group nitni

nitc > nitni

Native interface related services (used underneath the FFI)
group parser

nitc > parser

Parser and AST for the Nit language
group platform

nitc > platform

Platform system, used to customize the behavior of the compiler.
group saf

nitc > saf

Nit Static Analysis Framework.
group semantize

nitc > semantize

Process bodies of methods in regard with the model.
group static

nitc > doc > static

Nitdoc generation framework
group term

nitc > doc > term

group testing

nitc > testing

Test unit generation and execution for Nit.
group uml

nitc > uml

Group head module for UML generation services
group vm

nitc > vm

Entry point of all vm components