OC-mdbrowser/mdptest.lua
2018-06-17 15:17:59 +10:00

14 lines
409 B
Lua

local md = require "mdparse"
teststr = [[This is a test markdown string. It contains formatting including bold and italics, and [links](somewhere else) too.
Here is a paragraph break, I suppose.
Here's another. ]]
lines, links = md.reflow(teststr, 40)
print("0\t"..("1234567890"):rep(4))
for k,v in pairs(lines) do print(k,v) end
print("\nLinks:")
for k,v in pairs(links) do print(k,v[1], v[2], v[3]) end