mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-11-04 13:00:10 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			39 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			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 })
 |