pWiki/pwiki/filters/markdown.js
Alex A. Naanou 6befa05d33 lots of tweaks and cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2022-08-15 14:29:45 +03:00

39 lines
1.1 KiB
JavaScript
Executable File

/**********************************************************************
*
*
*
**********************************************************************/
((typeof define)[0]=='u'?function(f){module.exports=f(require)}:define)
(function(require){ var module={} // make module AMD/node compatible...
/*********************************************************************/
var base = require('./base')
var showdown = require('showdown')
//---------------------------------------------------------------------
module.markdown =
base.Filter(
{quote: 'quote-markdown'},
function(source){
var converter = new showdown.Converter({
strikethrough: true,
tables: true,
tasklists: true,
})
// XXX the problem here is that any string gets nested into a
// paragraph -- this messes up partial filtering...
return converter.makeHtml(source) })
module.quoteMarkdown =
function(source){
// XXX
return source }
/**********************************************************************
* vim:set ts=4 sw=4 : */ return module })