From 3e6ac2a63501b8b83be318b33718c0f4aca9e055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=B0=D1=82=D1=8C=D1=8F=D0=BD=D0=B0=20=D0=A4=D0=B0?= =?UTF-8?q?=D1=80=D0=B1=D0=B5=D1=80?= Date: Sun, 14 Dec 2025 23:45:26 +0400 Subject: [PATCH] add readme --- README.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) 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