• This repository has been archived on 31/Oct/2023
  • Stars
    star
    50
  • Rank 560,788 (Top 12 %)
  • Language
    HTML
  • License
    Other
  • Created about 15 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The perl Text::Markdown CPAN module

WARNING

This Readme is from the original version of Markdown; not all of the information contained herein is applicable to Test::Markdown the CPAN module that includes this file. See the module's POD file for more information.

Install locally

This module uses Module::Install. Run this before starting to work and install other dependencies

cpanm Module::Install Module::Install::CheckConflicts

And then

cpanm --installdeps . 
perl Makefile.PL

Of course, all this is solved if you just download it from CPAN using, for instance,

cpanm Text::Markdown

Markdown

Version 1.0.1 - Tue 14 Dec 2004

by John Gruber
http://daringfireball.net/

Introduction

Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

Thus, "Markdown" is two things: a plain text markup syntax, and a software tool, written in Perl, that converts the plain text markup to HTML.

Markdown works both as a Movable Type plug-in and as a standalone Perl script -- which means it can also be used as a text filter in BBEdit (or any other application that supporst filters written in Perl).

Full documentation of Markdown's syntax and configuration options is available on the web: http://daringfireball.net/projects/markdown/. (Note: this readme file is formatted in Markdown.)

Installation and Requirements

Markdown requires Perl 5.6.0 or later. Welcome to the 21st Century. Markdown also requires the standard Perl library module Digest::MD5.

Movable Type

Markdown works with Movable Type version 2.6 or later (including MT 3.0 or later).

  1. Copy the "Markdown.pl" file into your Movable Type "plugins" directory. The "plugins" directory should be in the same directory as "mt.cgi"; if the "plugins" directory doesn't already exist, use your FTP program to create it. Your installation should look like this:

    (mt home)/plugins/Markdown.pl
    
  2. Once installed, Markdown will appear as an option in Movable Type's Text Formatting pop-up menu. This is selectable on a per-post basis. Markdown translates your posts to HTML when you publish; the posts themselves are stored in your MT database in Markdown format.

  3. If you also install SmartyPants 1.5 (or later), Markdown will offer a second text formatting option: "Markdown with SmartyPants". This option is the same as the regular "Markdown" formatter, except that automatically uses SmartyPants to create typographically correct curly quotes, em-dashes, and ellipses. See the SmartyPants web page for more information: http://daringfireball.net/projects/smartypants/

  4. To make Markdown (or "Markdown with SmartyPants") your default text formatting option for new posts, go to Weblog Config -> Preferences.

Note that by default, Markdown produces XHTML output. To configure Markdown to produce HTML 4 output, see "Configuration", below.

Blosxom

Markdown works with Blosxom version 2.x.

  1. Rename the "Markdown.pl" plug-in to "Markdown" (case is important). Movable Type requires plug-ins to have a ".pl" extension; Blosxom forbids it.

  2. Copy the "Markdown" plug-in file to your Blosxom plug-ins folder. If you're not sure where your Blosxom plug-ins folder is, see the Blosxom documentation for information.

  3. That's it. The entries in your weblog will now automatically be processed by Markdown.

  4. If you'd like to apply Markdown formatting only to certain posts, rather than all of them, see Jason Clark's instructions for using Markdown in conjunction with Blosxom's Meta plugin:

    http://jclark.org/weblog/WebDev/Blosxom/Markdown.html

BBEdit

Markdown works with BBEdit 6.1 or later on Mac OS X. (It also works with BBEdit 5.1 or later and MacPerl 5.6.1 on Mac OS 8.6 or later.)

  1. Copy the "Markdown.pl" file to appropriate filters folder in your "BBEdit Support" folder. On Mac OS X, this should be:

    BBEdit Support/Unix Support/Unix Filters/
    

    See the BBEdit documentation for more details on the location of these folders.

    You can rename "Markdown.pl" to whatever you wish.

  2. That's it. To use Markdown, select some text in a BBEdit document, then choose Markdown from the Filters sub-menu in the "#!" menu, or the Filters floating palette

Configuration

By default, Markdown produces XHTML output for tags with empty elements. E.g.:

<br />

Markdown can be configured to produce HTML-style tags; e.g.:

<br>

Movable Type

You need to use a special MTMarkdownOptions container tag in each Movable Type template where you want HTML 4-style output:

<MTMarkdownOptions output='html4'>
    ... put your entry content here ...
</MTMarkdownOptions>

The easiest way to use MTMarkdownOptions is probably to put the opening tag right after your <body> tag, and the closing tag right before </body>.

To suppress Markdown processing in a particular template, i.e. to publish the raw Markdown-formatted text without translation into (X)HTML, set the output attribute to 'raw':

<MTMarkdownOptions output='raw'>
    ... put your entry content here ...
</MTMarkdownOptions>

Command-Line

Use the --html4tags command-line switch to produce HTML output from a Unix-style command line. E.g.:

% perl Markdown.pl --html4tags foo.text

Type perldoc Markdown.pl, or read the POD documentation within the Markdown.pl source code for more information.

Bugs

To file bug reports or feature requests please send email to: [email protected].

Version History

1.0.1 (14 Dec 2004):

  • Changed the syntax rules for code blocks and spans. Previously, backslash escapes for special Markdown characters were processed everywhere other than within inline HTML tags. Now, the contents of code blocks and spans are no longer processed for backslash escapes. This means that code blocks and spans are now treated literally, with no special rules to worry about regarding backslashes.

    NOTE: This changes the syntax from all previous versions of Markdown. Code blocks and spans involving backslash characters will now generate different output than before.

  • Tweaked the rules for link definitions so that they must occur within three spaces of the left margin. Thus if you indent a link definition by four spaces or a tab, it will now be a code block.

       [a]: /url/  "Indented 3 spaces, this is a link def"
    
        [b]: /url/  "Indented 4 spaces, this is a code block"
    

    IMPORTANT: This may affect existing Markdown content if it contains link definitions indented by 4 or more spaces.

  • Added >, +, and - to the list of backslash-escapable characters. These should have been done when these characters were added as unordered list item markers.

  • Trailing spaces and tabs following HTML comments and <hr/> tags are now ignored.

  • Inline links using < and > URL delimiters weren't working:

    like [this](<http://example.com/>)
    
  • Added a bit of tolerance for trailing spaces and tabs after Markdown hr's.

  • Fixed bug where auto-links were being processed within code spans:

    like this: `<http://example.com/>`
    
  • Sort-of fixed a bug where lines in the middle of hard-wrapped paragraphs, which lines look like the start of a list item, would accidentally trigger the creation of a list. E.g. a paragraph that looked like this:

    I recommend upgrading to version
    8. Oops, now this line is treated
    as a sub-list.
    

    This is fixed for top-level lists, but it can still happen for sub-lists. E.g., the following list item will not be parsed properly:

    +	I recommend upgrading to version
    	8. Oops, now this line is treated
    	as a sub-list.
    

    Given Markdown's list-creation rules, I'm not sure this can be fixed.

  • Standalone HTML comments are now handled; previously, they'd get wrapped in a spurious <p> tag.

  • Fix for horizontal rules preceded by 2 or 3 spaces.

  • <hr> HTML tags in must occur within three spaces of left margin. (With 4 spaces or a tab, they should be code blocks, but weren't before this fix.)

  • Capitalized "With" in "Markdown With SmartyPants" for consistency with the same string label in SmartyPants.pl. (This fix is specific to the MT plug-in interface.)

  • Auto-linked email address can now optionally contain a 'mailto:' protocol. I.e. these are equivalent:

  • Fixed annoying bug where nested lists would wind up with spurious (and invalid) <p> tags.

  • You can now write empty links:

    [like this]()
    

    and they'll be turned into anchor tags with empty href attributes. This should have worked before, but didn't.

  • ***this*** and ___this___ are now turned into

    <strong><em>this</em></strong>
    

    Instead of

    <strong><em>this</strong></em>
    

    which isn't valid. (Thanks to Michel Fortin for the fix.)

  • Added a new substitution in _EncodeCode(): s/$/$/g; This is only for the benefit of Blosxom users, because Blosxom (sometimes?) interpolates Perl scalars in your article bodies.

  • Fixed problem for links defined with urls that include parens, e.g.:

    [1]: http://sources.wikipedia.org/wiki/Middle_East_Policy_(Chomsky)
    

    "Chomsky" was being erroneously treated as the URL's title.

  • At some point during 1.0's beta cycle, I changed every sub's argument fetching from this idiom:

    my $text = shift;
    

    to:

    my $text = shift || return '';
    

    The idea was to keep Markdown from doing any work in a sub if the input was empty. This introduced a bug, though: if the input to any function was the single-character string "0", it would also evaluate as false and return immediately. How silly. Now fixed.

Donations

Donations to support Markdown's development are happily accepted. See: http://daringfireball.net/projects/markdown/ for details.

Copyright and License

Copyright (c) 2003-2004 John Gruber
http://daringfireball.net/
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name "Markdown" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

More Repositories

1

AWSnycast

'Anycast' in AWS
Go
228
star
2

catalystx-simplelogin

Simple login controller and template bundle for Catalyst
Perl
26
star
3

text-multimarkdown

Text::MultiMarkdown CPAN module
Perl
21
star
4

terraform-provider-nsone

A terraform provider to manage zones/records/feeds in nsone
Go
17
star
5

terraform-aws-coreos-kubernates-cluster

Smarty
16
star
6

catalyst-app-example-locallibapp

Perl
12
star
7

puppet-aws_api

DEPRECATED. DO NOT USE.
Ruby
12
star
8

tf_aws_mesos

Makefile
12
star
9

terraform-vpc-nat

HCL
10
star
10

docker-socket-http-proxy

Simple nginx proxy container for the docker socket
Nginx
9
star
11

CatalystX-JobServer

Asynchronous job AMQP job server and message handler, with long hair.
Perl
9
star
12

catalystx-dynamiccomponent

Generate an entire trivial app, including the code for controllers and models from config. Moosetastic.
Perl
8
star
13

catalyst-actionrole-acl

Apply ACLs to Catalyst actions
Perl
7
star
14

nerve-etcd

Nerve registration container (etcd backend)
Shell
6
star
15

synapse-etcd-amb

Synapse Ambassador container (etcd servicewatcher)
Shell
6
star
16

terraform-example-mesos-cluster

A self contained example of using Terraform to build a Mesos cluster
Makefile
6
star
17

perl-php-serialization

PHP::Serialization CPAN module
Perl
6
star
18

moosex-types-iso8601

ISO 8601 times and duration strings, with coercions from DateTimes
Perl
5
star
19

arduino-mumble-mic-ptt

An Arduino sketch to turn an UNO into a HID keyboard, for adapting a PTT CB mic for use with http://mumble.sourceforge.net/
Arduino
5
star
20

MogileFS-Client-Async

Asynchronous (AnyEvent) MogileFS client
Perl
5
star
21

log-message-structured

Simple structured log messages as JSON
Perl
4
star
22

terraform-vpc

HCL
4
star
23

puppet-ethtool

Set ethernet options from puppet
Ruby
4
star
24

app-git-sync

Little app to ensure that I have an up to date clone of everything relevant on my laptop.
Perl
4
star
25

aws-instance-health-exporter

Prometheus exporter for AWS instance health events
Go
4
star
26

sensuplugingo

A simple framework for writing sensu checks and handlers in golang
Go
3
star
27

catalyst-traitfor-request-proxybase

Catalyst Request trait which allows you to set the URI base with a HTTP header
Perl
3
star
28

test-eol

Test perl files in your distribution have correct line endings
Perl
3
star
29

MooseX-Types-LoadableClass

Trivial type coercion to load a class type.
Perl
3
star
30

catalyst-engine-stomp

Catalyst::Engine::Stomp - message-driven Catalyst
Perl
3
star
31

tangram

Tangram is a non-intrusive Object/Relational Mapper / Persistence Program for Perl.
Perl
3
star
32

terraform-example-vpc

HCL
3
star
33

alien-apachemq

perl Alien::ActiveMQ package
Perl
3
star
34

MonitoringJS

Javascript mash up of mcollective registration data, mongodb puppet and nagios-api, with bootstrap
JavaScript
3
star
35

moosex-strictattributes

Make Moose attribute definitions stricter
Perl
2
star
36

catalyst-app-tutorial-kiffin-authissues

Perl
2
star
37

mcollective-discovery-sensu

mcollective-disocovery-sensu
Ruby
2
star
38

catalyst-app-example-chainedprotocol

Example app for a blog post :) (Nothing to see here yet)
Perl
2
star
39

IPC-Lock-RabbitMQ

Perl
2
star
40

App-RabbitTail

Spew log files into RabbitMQ
Perl
2
star
41

net-zuora

perl SOAP::Lite wrapper for the Zuora Z-Billing API
Perl
2
star
42

moosex-types-datetime-mysql

Perl
2
star
43

Devel-InterpreterSize

Devel-InterpreterSize
Perl
2
star
44

ipc-shellcmd

The IPC::ShellCmd perl module
Perl
2
star
45

mcollective-agent-repository

mco agent to update svn and git repositories
Ruby
2
star
46

moosex-types-email

Email address type for Moose
Perl
2
star
47

Kaizendo

A tool for collaborative authoring of polyscopic documents
Perl
2
star
48

catalyst-actionrole-findviewbyisa

Action role to find a view from the available application views by superclass
Perl
2
star
49

terraform-ubuntu-ami

Terraform module for finding public ubuntu AMIs
Ruby
2
star
50

fcgi2

Mirror of FCGI.pm from git://git.shadowcat.co.uk/catagits/fcgi2.git
C
2
star
51

catalyst-app-bug-go_chain

Perl
2
star
52

terracraft

Minecraft server and terraform
HCL
2
star
53

catalyst-app-bug-unknown-error

Perl
2
star
54

Alien-Ditaa

Trivial wrapper for ditaa (http://ditaa.sourceforge.net) to enable using in in perl.
Perl
2
star
55

acme-UNIVERSAL-cannot

Adds cannot, cant and can't methods to UNIVERSAL, so that all your perl programs get the 'benefit' of negative method assertions
Perl
2
star
56

Catalyst-View-ContentNegotiation-XHTML

Perl
1
star
57

catalyst-app-example-newscripts

Example catalyst app as generated by the new scripts. Just a placeholder so I don't keep having to install -Devel and generate one
Perl
1
star
58

puppet-pgx

Experimental puppet DSL parser, for the lols
Perl
1
star
59

Message-Passing-Output-Growl

Message-Passing-Output-Growl
Perl
1
star
60

vagrant-docker

Ruby
1
star
61

perl-smartmatch-tests

tests for the ~~ fixes for 5.10.1
Perl
1
star
62

Noose

just enough object orientation to hang yourself
Perl
1
star
63

App-TailRabbit

Perl
1
star
64

Net-AMQP-PP

Perl
1
star
65

Message-Passing-STOMP

Log-Stash-STOMP
Perl
1
star
66

puppet-network_address_functions

Ruby
1
star
67

coreos-smartstack-demo

Ruby
1
star
68

Message-Passing-Collectd

Message-Passing-Collectd
Perl
1
star
69

catalystx-script-fcgi-engine

A Catalyst FastCGI script to use FCGI::Engine
Perl
1
star
70

mayhem

Go
1
star
71

coreos-jenkins

Experimental Jenkins cluster
Shell
1
star
72

Form-Functional

Perl
1
star
73

perl_proc_background

git clone of the Proc::Background module from http://www.orcaware.com/svn/repos/perl_proc_background/
Perl
1
star
74

App-TailRabbit-Growl

Perl
1
star
75

catalyst-app-bug-lighty-encodingwarnings

Using lighty and fcgi with C::P::Session + C::P::Unicode - encoding can get totally screwed if you use encoding::warnings.. Weird! Please someone fix for me?
Perl
1
star
76

authen-ntlm-http

Authen::NTLM::HTTP - another one of my abandoned module rescues
Perl
1
star
77

Presentation-Quanto-PerlLuaJQuery_MySQLStats

Lightning talk for the BCS dynamic languages evening
JavaScript
1
star
78

Presentation-Refactoring_with_Moose

Rewrite of my original #london.pm presentation + infrastructure to build and install slides on disk..
JavaScript
1
star
79

griwlrssi

A stupid, no-brainer, unconfigurable growl notifier for irssi->screen->ssh
Perl
1
star
80

bobtfish.github.io

My blog
HTML
1
star
81

Math-Inequalities-Parser

Math::Inequalities::Parser CPAN module
Perl
1
star
82

Module-Install-Authority

Adds x_authority to META.yml for Module::Install based installers
Perl
1
star
83

puppet-disable_caller_module_name

Hacks the puppet DSL to make $caller_module_name == $module_name, thus disabling 'private' classes.
Ruby
1
star
84

CatalystX-Debug-ResponseHeaders

Add all the response headers to a Catalyst debug screen.
Perl
1
star
85

AnyMQ-Hippie

Perl
1
star
86

CatalystX-Debug-RequestHeaders

Add all the request headers to a Catalyst debug screen.
Perl
1
star
87

catalystx-oauth2-provider

An attempt at implementing a reusable component for oauth providers in catalyst
Perl
1
star
88

Audio-SndFile

Release history of Audio-SndFile
Perl
1
star
89

DBD-mysql

DBD::mysql Perl client driver for the MySQL and MariaDB databases
Perl
1
star
90

catalyst-traitfor-controller-renderview

Experimental replacement for Catalyst::Action::RenderView
Perl
1
star
91

catalyst-model-ldap-fromauthentication

Ties Catalyst::Authentication::Store::LDAP and Catalyst::Model::LDAP together to give you a model which is connected as the user you authenticated as.
Perl
1
star
92

local-lib-deps

This module uses local::lib to allow applications to maintain a private path of dependancy modules.
Perl
1
star
93

http-proxy-selective

HTTP::Proxy using CSS dev tool, now 'open sourced' by Venda who I wrote it for, so githubbing the code
Perl
1
star
94

Module-Install-AutoProvidesFromCompilation

Fill in the provides metadata in your distribution by hooking compilation of the code, ergo getting correct metadata for things PAUSE won't recognise itself, like MX::Declare classes
Perl
1
star