Compare commits

..

No commits in common. "main" and "v1.0" have entirely different histories.
main ... v1.0

3 changed files with 2 additions and 81 deletions

View File

@ -32,82 +32,6 @@ 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 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 styles exist)
- index - table of content (if flag = 'toc')
## Flags
```
markdown.compile(markdown_text,flag,flag,flag)
```
### List of flags:
- "nolinks" - dont do link processing, block tags
- "noimages" - dont do image processing, block
- "nopants" - dont run smartypants()
- "nohtml" - dont allow raw html through AT ALL
- "strict" - conform to Markdown standard as implemented in Markdown.pl
- "tagtext" - process text inside an html tag
- "noext" - dont allow pseudo-protocols
- "cdata" - generate code for xml ![CDATA[…]]
- "nosuperscript" - no A^B
- "notables" - disallow tables
- "nostrikethrough" - forbid strikethrough
- "toc" - do table-of-contents processing (index)
- "compat" - compatibility with MarkdownTest_1.0
- "autolink" - make http://foo.com link even without <>s
- "safelink" - paranoid check for link protocol
- "noheader" - dont process header blocks
- "tabstop" - expand tabs to 4 spaces
- "nodivquote" - forbid >%class% blocks
- "noalphalist" - forbid alphabetic lists
- "extrafootnote" - enable markdown extra-style footnotes
- "nostyle" - dont extract style blocks
- "dlextra" - enable extra-style definition lists
- "fencedcode" - enabled fenced code blocks
- "idanchor" - use id= anchors for TOC links
- "githubtags" - allow dash and underscore in element names
- "urlencodedanchor" - urlencode non-identifier chars instead of replacing with dots
- "latex" - handle embedded LaTeX escapes
- "html5" - handle html5 elements (maybe obsolete?)
- "normallist" - disable github-style checkbox lists
- "explicitlist" - dont combine numbered/bulletted lists
- "dldiscount" - enable discount-style definition lists
- "altastitle" - use alt text as the title if no title is listed
- "extendedattr" - allow extended attribute suffixes
Example:
```
markdown.compile(markdown_text,"extrafootnote","toc","notables")
```
License License
------- -------

View File

@ -1,6 +1,5 @@
package = "discount3" package = "discount3"
version = "1.0-1" version = "1.0-1"
rockspec_format = '3.0'
description = { description = {
summary = "Lua bindings for the Discount Markdown library V3", summary = "Lua bindings for the Discount Markdown library V3",
@ -8,17 +7,15 @@ description = {
Supports all tags. Supports all tags.
]], ]],
homepage = "https://gitlabor.ru/Datenlabor/discount3", homepage = "https://gitlabor.ru/Datenlabor/discount3",
labels = { 'markdown', 'discount'} ,
license = "ISC" license = "ISC"
} }
source = { source = {
url = "git+https://gitlabor.ru/Datenlabor/discount3/", url = "https://gitlabor.ru/Datenlabor/discount3/tags/v1.0-0.tar.gz"
tag = "1.0-1"
} }
dependencies = { dependencies = {
"lua = 5.1" "lua >= 5.1"
} }
external_dependencies = { external_dependencies = {

Binary file not shown.