Commit graph

51 commits

Author SHA1 Message Date
Sam Soffes
0bb213e183 Optional highlight support 2013-09-19 15:10:24 -05:00
Sam Soffes
2bc4d16695 Add optional underline support
This is `*italic*` and this is `_underline_` when enabled.
2013-09-19 12:32:30 -05:00
Joel Rosenberg
bb3a9d92c3 Adding a prettyprint class for google-code-prettify 2013-09-19 11:47:49 -05:00
Mike Morearty
8d30051774 Fix SmartyPants handling of single quotes 2013-09-19 11:04:33 -05:00
Balazs Nagy
92c9d20b0a Align td and th with css instead of align property
When you align tables with css, <td align="..."> gets overridden.
Using inline styles keeps alignment no matter what CSS contains.
2013-09-18 17:57:52 -05:00
Ben Dolman
0f1b2a017f Add MultiMarkdown footnotes extension 2013-09-18 17:22:09 -05:00
JJ Allaire
ea1b87928c add extern C declaration when using c++ compiler 2012-04-04 15:15:29 -04:00
Vicent Martí
8e5b0d14c9 Fix setting the level offset when parsing multiple docs 2012-03-30 00:05:24 +02:00
Frank Smit
fa0bd49575 Do not nest the fist list in a table of contents.
If the first header of a document is a level three header the first list
is nested two times. To prevent this an offset if set when the first
header is found and after that the level is changed to (level - offset).
2012-03-29 23:08:44 +02:00
Sebastien Rombauts
37712fd083 Fix for building with Visual Studio 2008 Express
Correct the following link errors:
markdown.obj : error LNK2019: unresolved external symbol _strncasecmp referenced in function _find_block_tag
autolink.obj : error LNK2001: unresolved external symbol _strncasecmp
html_smartypants.obj : error LNK2019: unresolved external symbol _snprintf referenced in function _smartypants_quotes

I needed to add 1 define in 3 files, betweend #if defined(_WIN32) guards :
- #define strncasecmp _strnicmp
- #define snprintf _snprintf
2012-03-25 14:57:52 +02:00
Greg Leaver
76a86ff546 TOC should only show link name, fixes #62. 2012-03-03 16:13:14 -05:00
Greg Leaver
0f57962b82 Escape html inside table of contents. 2012-02-14 21:40:25 -05:00
Vicent Marti
36b4518226 Merge remote-tracking branch 'chitsaou/escape' 2011-12-12 20:58:35 +01:00
Vicent Marti
c419f6276f Revert to non-secure Houdini escaping
Non-secure is the same escaping mode we used before; I don't get how
escaping the forward slash makes HTML escaping more secure (hint: it
doesn't).
2011-12-12 20:34:21 +01:00
chitsaou
519691a235 don't hook blockhtml callback when escape_html is on 2011-12-08 10:44:41 +08:00
chitsaou
4d42772c32 implement HTML renderer with escape_html option 2011-12-08 10:44:24 +08:00
chitsaou
acbbf3a453 add HTML_ESCAPE option to renderer 2011-12-08 10:44:00 +08:00
Vicent Marti
a20ff08f6c Change include wards 2011-11-26 07:06:50 +01:00
Chad Weider
4a51f62c5d Include several other excluded blocks from original SmartyPants 2011-11-25 13:49:49 -08:00
Chad Weider
844ce0e219 Do not replace contents of <style> blocks. 2011-11-25 13:47:16 -08:00
jbergstroem
db350c6bc0 fix: error: ‘esc’ may be used uninitialized in this function 2011-09-28 23:13:49 +02:00
Vicent Marti
72a940f269 Fix mixed HTML/URI escaping 2011-09-13 00:20:42 +02:00
Vicent Marti
5629a8ab4f Ops! Use URI escaping instead of URL
URL escaping fully escapes all URL components to allow embedding an URL
inside of another. URI escaping is what we need to build the links for
<a> tags!
2011-09-08 22:50:03 +02:00
Vicent Marti
1f78bc3df4 Change signature of Smartypants
Don't use input buffer anymore.
2011-09-08 21:48:51 +02:00
Vicent Marti
a3373cd380 Use Houdini for escaping
Ta-da.
2011-09-08 21:37:50 +02:00
Vicent Marti
2c4b7f5689 Remove GH-style code blocks
This is very specific to GitHub. If you need something similar, write a
custom callback to handle your needs. :)
2011-09-02 23:41:51 +02:00
Vicent Marti
63b1a9ebcf Enforce const on the renderer API 2011-09-02 23:40:21 +02:00
Vicent Marti
d7d2af549e UTF-8 handling overhaul
Sundown doesn't handle "strings of characters", it handles buffers
with bytes with an UTF-8 encoding.

Name stuff accordingly.
2011-09-02 20:19:48 +02:00
Greg Leaver
ff2b89be86 Improving TOC nesting. 2011-08-20 13:37:51 +02:00
Vicent Marti
a40cdb9ece smartypants: Add escaping support 2011-08-09 16:59:04 -07:00
Vicent Marti
714348714d Cleanup table parsing 2011-08-08 21:11:42 -07:00
Neil Williams
6cfe32ade8 Use <th> for table header cells. 2011-08-08 20:57:35 -07:00
Vicent Martí
bf369cb00f Merge pull request #54 from spladug/entities
Entity-escape link hrefs.
2011-08-08 19:54:31 -07:00
Neil Williams
3014d5d317 Entity-escape link hrefs. 2011-08-08 09:51:59 -07:00
Neil Williams
60b2f3b510 Fix segfault doing SAFELINK check on empty links. 2011-08-07 21:57:08 -07:00
Vicent Marti
dd979be0ed Experimental: New Renderer management
No more dynamic allocation. Explicit is better than implicit.
2011-08-04 16:22:38 +02:00
Vicent Marti
e07028b856 Experimental: Custom allocation of the HTML renderer 2011-08-04 13:14:59 +02:00
Vicent Marti
bebbebfc87 html: Revert "do not render line breaks between HTML tags"
This was not a good fix. There is plenty of HTML that would have been
parsed unproperly, e.g.

	This is a simple example of <em>HTML</em>
	that would have not been broken in two lines.

The proper fix is to always print line breaks instead of newlines, and
ensure that Sundown never inserts newlines when rendering span-level
elements, which is the case since the previous commit.
2011-08-01 16:03:32 +02:00
Vicent Marti
6f0b745604 html: More consistent newlines in the HTML output 2011-08-01 15:59:03 +02:00
Vicent Marti
a336c2684e html: Do not force line breaks between HTML tags 2011-08-01 13:35:42 +02:00
Vicent Marti
1d6f114b86 Sup bro
Add support for the Superscript extension.
2011-07-25 02:15:43 +02:00
Vicent Marti
fe9e518b92 html: Add an extra payload to the renderer 2011-07-22 23:57:14 +02:00
Vicent Marti
cdfaee1993 smartypants: Do not replace inside <code> blocks
Following the original Smartypants code, do not do SmartyPants
replacements inside of <code>, <pre>, <kbd> and <script> blocks.
2011-07-19 21:32:14 +02:00
Vicent Marti
a580f7b2a0 smartypants: Normalize dash replacement
The original SmartyPants comes with three dash replacement modes:

	1 =>  "--" for em-dashes; no en-dash support
	2 =>  "---" for em-dashes; "--" for en-dashes
	3 =>  "--" for em-dashes; "---" for en-dashes

Sundown now runs with number 2, because I am opinionated and I think
that the other 2 options are stupid.
2011-07-19 19:19:55 +02:00
Vicent Marti
5d201dbcdc Rename Upskirt to Sundown
It is by the goodness of God that in our country we have those
three unspeakably precious things:

    freedom of speech,
    freedom of conscience,
    and the prudence never to practice either of them.

                -- Mark Twain, Following the Equator (1897)
2011-07-19 01:10:05 +02:00
Vicent Marti
cf5cb52ae9 Remove html_autolink.c
This file has been moved to Rinku
2011-06-11 16:17:51 +02:00
Vicent Marti
af491aad94 Use function callbacks instead of a switch 2011-06-09 16:31:22 +02:00
Vicent Marti
19115feb28 autolink: Support for link attributes 2011-06-09 15:15:34 +02:00
Vicent Marti
b3957282ce autolink: Cleanup API 2011-06-09 02:58:06 +02:00
Vicent Marti
8af37fd1b4 autolinking: fix bugs 2011-06-08 23:11:58 +02:00