Commit graph

6 commits

Author SHA1 Message Date
Vicent Marti
23d4fcda11 smartypants: Silence the warning with a (void) cast 2011-11-22 08:10:52 +01:00
jbergstroem
809c8bf15f fix: error: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result 2011-09-28 23:18:18 +02:00
Vicent Marti
877aa79c9e Fix compilation for Smartypants example 2011-09-13 00:21:33 +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
eb6f5474c2 Upskirt now renders HTML by default
The XHTML renderer has been changed to HTML by default, with a new
renderer flag called "HTML_USE_XHTML" that enables closing tags.
2011-05-06 20:29:41 +03:00
Vicent Marti
789bcd98e1 SmartyPants is now smart
SmartyPants is no longer an extension flag for the (X)HTML renderer, but
a separate method.

The new function `ups_xhtml_smartypants` external method is a
SmartyPants post-processor that takes an HTML document (e.g. a document
that has just been rendered with `ups_markdown`) and performs
SmartyPants substitutions in it.

This is the same approach that the original SmartyPants takes.
Postprocessing the HTML instead of performing the substitutions at the
Markdown level allows us to work around many problems of the old
implementation:

	- Double quotes now properly open/close between different HTML
	tags and blocks.

	- Support for ``double quoting style'' has been added, and no
	longer conflicts with Markdown code blocks.

	- The limitations of the Upskirt parser (which was splitting
	SmartyPants replacements mid-word in some cases because of active
	character callbacks) no longer apply. All SmartyPants substitutions
	work in all situations.

	- The new parser is easily extendable with more substitutions.

The new SmartyPants parser is slightly faster than the old one.
2011-05-05 17:47:37 +03:00