306 Commits

Author SHA1 Message Date
Christopher Jeffrey
aba62d01d6 style: do not violate 80 col limit. no double quotes. 2013-08-08 11:29:26 -05:00
Christopher Jeffrey
f74978c3cd another charAt. minor space consistency changes. 2013-08-08 10:03:52 -05:00
Christopher Jeffrey
ab2b953ea9 use charAt. fixes #192. 2013-08-08 04:25:12 -05:00
Christopher Jeffrey
d53f20690f fix nested links+img. 2013-08-07 10:42:55 -05:00
Christopher Jeffrey
37698ee7e0 list-like lines = lists in gfm. fixes #120. 2013-08-07 08:52:01 -05:00
John Long
09e83d52ba Switch from th/td attribute 'align' to style attribute 'text-align' for aligning 2013-08-06 14:51:33 -05:00
Christopher Jeffrey
031b897619 rewrite smartypants to match style. 2013-08-04 07:07:49 -05:00
Christopher Jeffrey
75dff71cb1 remove all non-word characters from heading id's. see #181. 2013-08-04 07:04:51 -05:00
Christopher Jeffrey
3b2d4bdef6 Merge pull request #181 from jasonkarns/heading-ids
Generate Heading IDs
2013-08-04 04:45:23 -07:00
Jason Karns
a0f13ed00e Generate heading IDs in HTML output.
Uses the heading text itself as the ID for the H*. The only
transformation made is to replace whitespace with '-' (hyphen). This
conforms to the HTML5 spec wherein ID attributes can contain any
non-whitespace character. (The previous HTML4 restrictions on ID
attribute values have been relaxed.)

This feature is limited in scope to strictly generating heading IDs.
A future enhancement would be a simple way of letting the author specify
the ID attribute. Perhaps:
  # Some: Crazy Header  {#custom_id}

  to generate: <h1 id="custom_id">Some: Crazy Header</h1>
2013-08-02 17:48:30 -04:00
Christopher Jeffrey
3d64a85734 fix new lheading rule (2 chars) for markdown guide test. 2013-08-02 13:16:30 -05:00
Christopher Jeffrey
8ba8a6fdb0 update tests in other directories. 2013-08-02 13:12:33 -05:00
Christopher Jeffrey
f1851a18c8 minor async refactor. 2013-08-02 12:16:10 -05:00
Christopher Jeffrey
b16061ba2f Merge pull request #155 from minrk/no-escape-style
do not escape style elements
2013-08-02 10:04:16 -07:00
Christopher Jeffrey
321490b344 Merge pull request #174 from minrk/allow-space
allow spaces in inline URLs
2013-08-02 10:00:55 -07:00
Christopher Jeffrey
950b4ed0e7 Merge pull request #195 from mkozhukh/master
marked can't be called with two parameters
2013-08-02 09:46:22 -07:00
Christopher Jeffrey
be0c32369a Merge pull request #178 from tasuk/improve-smartypants
Improve smartypants support
2013-08-02 09:42:18 -07:00
insanehong
1a0ad5782d modify lheading converting for support standard markdown syntax 2013-08-02 13:10:57 +09:00
Maksim Kozhukh
9da7b230c7 [fix] marked can't run without options parameter 2013-07-15 10:49:44 +03:00
Vit Brunner
e7e9c07d6b Improve smartypants support
Taken from http://gist.github.com/drdrang/705071

Basically, if a ' or a " is preceded by the beginning of line, dash,
slash, parentheses, brackets, quotes, or whitespace, it's an opening
one. Otherwise it's a closing one.
2013-06-18 22:35:56 +01:00
MinRK
bf6b74bdc2 allow spaces in URLs 2013-06-17 16:23:38 -04:00
Christopher Jeffrey
e59d5d0bc4 whitespace 2013-05-28 20:38:38 -05:00
Christopher Jeffrey
e00d7e7a14 improve async code error handling. 2013-05-28 20:37:59 -05:00
Christopher Jeffrey
f7d36a715b fix async code. 2013-05-28 20:37:59 -05:00
MinRK
063848b213 do not escape style elements
extends 3fb76d7b2aa6ec86db4697a88238921c94d5dfaa to style tags
2013-05-13 08:44:28 -07:00
omeid
98bca24c9d Smarty panths fixed. :) 2013-05-05 15:17:10 +10:00
Christopher Jeffrey
b9c2a3dda3 Revert "implement smartypants."
This reverts commit d1990428bcfb1ab9da3a87f9e7024abbce732a90.
2013-03-18 07:14:52 -05:00
Christopher Jeffrey
d1990428bc implement smartypants. 2013-03-18 07:14:48 -05:00
Christopher Jeffrey
3fb76d7b2a do not escape script elements. fixes #142.
this is not accurate to the original markdown.pl,
but neither is not escaping `<pre>` elements.
2013-03-17 13:45:43 -05:00
Christopher Jeffrey
2160401dce add preliminary smartypants code. see #137. 2013-03-16 23:00:06 -05:00
Christopher Jeffrey
ee4b7a89f3 Revert "allow dashes in language names. fixes #138."
This reverts commit 608fdb3a1b35ce9da6461ea2e9b15a22909aa447.
2013-03-16 22:33:48 -05:00
Christopher Jeffrey
608fdb3a1b allow dashes in language names. fixes #138. 2013-03-16 22:32:57 -05:00
Christopher Jeffrey
db4b6d4724 async highlighter support. closes #47. 2013-03-16 22:32:15 -05:00
Niggler
2a242b782d GFM supports arbitrary characters in fenced code block language identifier 2013-03-16 23:23:25 -04:00
Christopher Jeffrey
777279361f small refactor. 2013-02-09 20:30:01 -06:00
Christopher Jeffrey
55a3a81e7f stop using isFinite for ordered lists. 2013-02-05 17:37:55 -06:00
Christopher Jeffrey
7e05d19bf9 clean up list 2013-02-05 17:23:28 -06:00
Christopher Jeffrey
86a1b457fc fix smart-lists for ordered lists 2013-02-05 17:19:10 -06:00
Christopher Jeffrey
45f3efba8a Fix variable name. 2013-01-22 12:53:33 -06:00
Christopher Jeffrey
84f6641a5c improve silent error message. 2013-01-17 09:27:00 -06:00
Guy Bedford
00cb0f1934 Update exports for server amd compatibility 2013-01-10 16:20:30 +02:00
Christopher Jeffrey
102659f8a2 fix small problem in def rule. see #101. 2013-01-10 06:51:13 -06:00
Christopher Jeffrey
e278e06377 smarter lists. fixes #55.
Example:
$ marked --smart-lists
- hi
- hi

1. hi
2. hi
^D
<ul>
<li>hi</li>
<li>hi</li>
</ul>
<ol>
<li>hi</li>
<li>hi</li>
</ol>
2013-01-10 03:12:09 -06:00
Christopher Jeffrey
5a1c7a5871 move vertical bar escape to gfm only. 2013-01-09 19:17:58 -06:00
Christopher Jeffrey
decd5893b0 ignore angle brackets in ref links. fixes #101. 2013-01-09 18:55:33 -06:00
Christopher Jeffrey
4cc2978385 this is faster than just cap[1] for some reason. 2013-01-09 18:46:50 -06:00
Christopher Jeffrey
f638f53051 better inline code trimming. avoid so many newlines after paragraphs. closes #103. 2013-01-09 18:14:56 -06:00
Christopher Jeffrey
cfe4d63fe7 fix options merge. 2013-01-09 17:56:54 -06:00
Christopher Jeffrey
83328261a1 add configurable -lang prefix. closes #67 and #54. 2013-01-09 17:02:57 -06:00
Christopher Jeffrey
48e766a90e Trim inline code. Fixes #69.
The inline code regex itself could also simply have \s* prepended
and appended to outside the main capture. However, this results
in less accurate behavior.
2013-01-09 14:12:23 -06:00