Commit Graph

42 Commits

Author SHA1 Message Date
Michael Teichgräber
5f0135f259 Improved AutoLinkEmail (Fletcher Penney). [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/ca4df46
2012-04-30 10:10:32 +02:00
Michael Teichgräber
95b1be5f7e Added ' and " to SpecialChars. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/5e22125
2012-04-30 10:07:49 +02:00
Michael Teichgräber
a653491ff5 Parse <script>...</script> as literal even in inline text. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/530acc5
2012-04-30 02:16:21 +02:00
Michael Teichgräber
d23584ac81 Don't allow <script> blocks to be nested. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/eb6c29e
2012-04-30 02:14:03 +02:00
Michael Teichgräber
caef05e3ed Require non-space after single quote start. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/8fa228e
2012-04-30 02:10:03 +02:00
Michael Teichgräber
19cb7e96a9 Added () to SpecialChars. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/2b094dc
2012-04-30 01:29:19 +02:00
Michael Teichgräber
01228db44b Simplified SingleQuoteStart. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/11d6864
2012-04-30 01:24:47 +02:00
Michael Teichgräber
77a926239d Fixed Str parser so it handles apostrophes inside words. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/4bb5083
2012-04-30 01:22:42 +02:00
Michael Teichgräber
eb8169a8e5 Require newline after Reference. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/fff88fe
2012-04-30 01:14:31 +02:00
Michael Teichgräber
cfb6c5e36b Changed order of AtxHeading & SetextHeading in Heading. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/a3b97b3
2012-04-30 01:06:43 +02:00
Michael Teichgräber
0a5e33b54d Fixed bug in setext headers. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/d57e706
2012-04-30 01:04:43 +02:00
Michael Teichgräber
b71976ee5d add a mechanism that makes sure only an up-to-date parser.leg.go can be used 2012-04-30 00:55:37 +02:00
Michael Teichgräber
cca2b1a3c2 mk_element: turn global allocation into a per-parser, reusable allocation.
This reduces memory usage within a single document, because
elements allocated during parsing of one Docblock can be reused
during parsing of the next Docblock.
2012-04-29 23:54:10 +02:00
Michael Teichgräber
f721084df0 new API: p := NewParser(&opts), p.Markdown(r, f) replaces d := Parse(r, opts), d.WriteHtml(w)
The new api allows to create a parser instance that can be
reused between calls to Markdown. Also, an interface `Formatter'
replaces the tight coupling between former Doc type and HTML
generation.
2012-04-28 22:57:55 +02:00
Michael Teichgräber
42e21972e8 parser.leg: fix Definition title 2012-04-24 00:53:54 +02:00
Michael Teichgräber
0248d52f7e sync with peg
- Parse now returns an `error'
- leg parser generator writes to stdout now, doesn't
  create a file xy.leg.go anymore
- turn on new optimizations
2012-04-24 00:15:47 +02:00
Michael Teichgräber
0cbfa7b920 parser.leg: print_tree: write to an io.Writer 2012-04-21 23:08:33 +02:00
Michael Teichgräber
4c6a2bc6b5 parser.leg: move concat_str_list implementation into mk_str_from_list 2012-04-21 23:06:04 +02:00
Michael Teichgräber
ef0f35c8b2 parser.leg: mk_link, mk_list: use named return values 2012-04-21 22:51:26 +02:00
Michael Teichgräber
91a38d3048 rename Extensions → Options 2012-04-21 22:37:54 +02:00
Michael Teichgräber
d5e7262b62 leg compiler: use switch optimization 2011-06-29 20:04:44 +02:00
Michael Teichgräber
05ed86d61e Added missing HtmlBlockOl to HtmlBlockInTags. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/09238d8
2011-02-21 09:11:51 +01:00
Michael Teichgräber
33db340b24 Tentative change to tight/loose lists. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/c480d05
2011-02-21 03:19:57 +01:00
Michael Teichgräber
5fa71aa19e Fixed exponential slowdown for some HTML. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/90cb74a
2011-02-21 03:16:05 +01:00
Michael Teichgräber
43b75cb12e Fixed bug in list continuations. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/bdd9c05
2011-02-21 02:58:53 +01:00
Michael Teichgräber
33ef9ad6bc Atx headers: Don't require space after ###. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/6515556
2011-02-21 02:55:06 +01:00
Michael Teichgräber
9a0423b225 Allow Atx header like this: '# header#'. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/7512333
2011-02-21 02:53:09 +01:00
Michael Teichgräber
47a94780b8 Fixed Alphanumeric. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/5b0bd3d
2011-02-21 02:48:43 +01:00
Michael Teichgräber
d8bbdbe0ff Fixed \178 -> \200. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/eb286be
2011-02-21 02:47:24 +01:00
Michael Teichgräber
b9766af7aa Fixed bug in ![nonexistent]. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/cc1be41
2011-02-21 02:46:27 +01:00
Michael Teichgräber
43c0e8660d Changed a &NonAlphanumeric to a !Alphanumeric. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/c5a32d2
2011-02-21 02:39:40 +01:00
Michael Teichgräber
916983bf94 Fixed smart quotes with accented letters. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/aa75ac6
2011-02-21 02:37:19 +01:00
Michael Teichgräber
7cfd682971 golang: log.Exitf->log.Fatalf 2011-02-18 12:00:25 +01:00
Michael Teichgräber
ef9d2c6af6 sync with peg-markdown
See https://github.com/jgm/peg-markdown/commit/a4713d59
2011-01-07 18:40:39 +01:00
Michael Teichgräber
1d57ae66a5 support definition lists 2010-12-13 19:36:35 +01:00
Michael Teichgräber
62502ab7a8 parser.leg: AtxStart: do a quick lookahead for `#' 2010-12-13 18:14:10 +01:00
Michael Teichgräber
13d48d799e parser.leg: HtmlBlock: do a lookahead for `<' 2010-12-13 18:02:24 +01:00
Michael Teichgräber
61becb6c37 parser.leg: mk_element: preallocate slices of elements 2010-12-13 17:49:24 +01:00
Michael Teichgräber
e40db066f3 parser.leg: scan for setext pattern before parsing Inlines (from jgm/peg-markdown) 2010-12-01 22:48:40 +01:00
Michael Teichgräber
c5747337a9 replace extension flags by Extension, a struct of boolean values 2010-11-24 19:56:25 +01:00
Michael Teichgräber
071bf92c4f use a single yyParser instance only, and reuse initialized parser 2010-11-24 19:36:10 +01:00
Michael Teichgräber
7a083c5dae initial import 2010-11-21 23:04:39 +01:00