diff --git a/README.md b/README.md index ba922c0..82173ac 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,82 @@ luarocks install discount3 If you get a compilation error during installation, it's because discount isn't installed as a shared library. See the solution here: https://gitlabor.ru/Datenlabor/discount +## Usage + +``` +local markdown = require('discount3') + +local html = markdown.compile(markdown_text) + +print(html.body) + +``` + +Returns: + +table: + +- body - html body +- title - doc's title (if header exists) +- author - doc's autor (if header exists) +- date - docs's date (if header exists) +- css - docs's CSS (if