Commit graph

8 commits

Author SHA1 Message Date
Vicent Marti
b8ed678a98 Enforce const on input document 2011-09-02 21:28:47 +02:00
Vicent Marti
13359d5898 Create a standalone markdown object
This was the next logical step on the interface revamp for 2.0.

The old API was doing very fishy stuff with allocation: the `rndr`
struct was being called once for every `sd_markdown` call, and the
amount stack space filled with it was just inappropriate (256 bytes
just from the char table and 300 more from pointers in the callback
table).

By creating the renderer on the heap and reusing it, we save a lot of
time on initialization code, at the expense of not being able to
change the enabled extensions on each parse (something which is not
that common anyway).

This will make wrapping Sundown in higher level languages more direct,
given that every other language has OO design, which maps better to
the concept of a reusable renderer.
2011-09-01 05:02:26 +02: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
72c9453882 Merge branch 'master' of github.com:tanoku/sundown 2011-07-24 23:29:23 +02:00
Matt Stancliff
ce1c48aee6 Fix sdhtml_renderer call
The previous commit changed the function signature
without changing a call to the new function signature.
2011-07-23 11:31:08 -07:00
Vicent Marti
7455702aaf Fix fwrite warning in sundown.c 2011-07-19 21:55:07 +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
Renamed from examples/upskirt.c (Browse further)