Python Markdown in ASP with WSC

Output

2.6.7

Hello World

Lorem ipsum dolorem sit amet.


Sources

default.asp

<%@ language="VBScript" %>
<!--#include virtual="/lib/unit-tests.asp"-->
<link href="/lib/unit-tests.css" rel="stylesheet" type="text/css" />
<h1>Python Markdown in ASP with WSC</h1>
<h2>Output</h2>
<div class="code"><pre><%

' regsvr32 /i:"scriptcomponentfile.wsc" %SystemRoot%\system32\scrobj.dll

with Server.CreateObject("AXE.Parsers.Markdown")
	Response.write( .version & vbNewline )
	Response.write( .parse( join( array( _
  "Hello World" _
, "=====" _
, "Lorem ipsum dolorem sit amet." _
	), vbNewline ) ) )
end with

%></pre></div>
<hr />
<h2>Sources</h2>
<h3>default.asp</h3>
<div class="code"><%= geshify( loadTextFile( Server.mapPath("default.asp") ), "asp" ) %></div>
<hr />
<h3>markdown.python.wsc</h3>
<div class="code"><%= geshify( loadTextFile( Server.mapPath("markdown.python.wsc") ), "python" ) %></div>

markdown.python.wsc

<?xml version="1.0" encoding="utf-8"?>
<component id="axe-parsers-markdown">
	<registration
		progid="AXE.Parsers.Markdown"
		description="This is a WSC wrapped version by Fabio Zendhi Nagao (nagaozen) from the Python implementation of John Gruber's Markdown."
		version="2.0.0"
		classid="{2B50B6A9-CEEC-4505-9A5E-585D47BB7C92}"
	/>

	<public>
		<property name="version"/>
		<method name="parse">
			<parameter name="data"/>
		</method>
	</public>

	<script language="Python">
	<![CDATA[

import markdown

version = markdown.version

def parse(data):
	return markdown.Markdown().convert(data)

	]]>
	</script>
</component>