Permalink
Browse files

added Sundown::toHtml and Sundown::toToc methods. to_html and to_toc …

…become deprecated
  • Loading branch information...
1 parent cb623e4 commit 90fc8823dee29027107b780c86207853cd1f0dbd @chobie committed Feb 5, 2012
Showing with 9 additions and 7 deletions.
  1. +9 −7 php_sundown.c
View
@@ -305,9 +305,9 @@ PHP_METHOD(sundown, __destruct)
}
/* }}} */
-/* {{{ proto string Sundonw::to_html()
+/* {{{ proto string Sundonw::toHtml()
Returns converted HTML string */
-PHP_METHOD(sundown, to_html)
+PHP_METHOD(sundown, toHtml)
{
sundown__render(SUNDOWN_RENDER_HTML,INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
@@ -321,20 +321,22 @@ PHP_METHOD(sundown, __toString)
}
/* }}} */
-/* {{{ proto string Sundonw::to_toc()
+/* {{{ proto string Sundonw::toToc()
Returns table of contents*/
-PHP_METHOD(sundown, to_toc)
+PHP_METHOD(sundown, toToc)
{
sundown__render(SUNDOWN_RENDER_TOC,INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
static zend_function_entry php_sundown_methods[] = {
PHP_ME(sundown, __construct, arginfo_sundown__construct, ZEND_ACC_PUBLIC)
PHP_ME(sundown, __destruct, NULL, ZEND_ACC_PUBLIC)
- /* to_html and to_toc methods are compatible with Redcarpet */
- PHP_ME(sundown, to_html, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(sundown, to_toc, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown, toHtml, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(sundown, toToc, NULL, ZEND_ACC_PUBLIC)
PHP_ME(sundown, __toString, NULL, ZEND_ACC_PUBLIC)
+ /* to_html and to_toc methods are compatible with Redcarpet */
+ PHP_MALIAS(sundown, to_html, toHtml, NULL, ZEND_ACC_PUBLIC)
+ PHP_MALIAS(sundown, to_toc, toToc, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* }}} */

0 comments on commit 90fc882

Please sign in to comment.