1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

improve comments

This commit is contained in:
Emanuil Rusev 2014-01-23 23:48:38 +02:00
parent 3a5eecc23d
commit 3e0c010c1f

View File

@ -15,10 +15,12 @@
class Parsedown class Parsedown
{ {
# /**
# Multiton (http://en.wikipedia.org/wiki/Multiton_pattern) * Multiton (http://en.wikipedia.org/wiki/Multiton_pattern)
# *
* @param string $name
* @return Parsedown
*/
static function instance($name = 'default') static function instance($name = 'default')
{ {
if (isset(self::$instances[$name])) if (isset(self::$instances[$name]))
@ -41,6 +43,12 @@ class Parsedown
private $breaks_enabled = false; private $breaks_enabled = false;
/**
* Enables GFM line breaks.
*
* @param bool $breaks_enabled
* @return $this
*/
function set_breaks_enabled($breaks_enabled) function set_breaks_enabled($breaks_enabled)
{ {
$this->breaks_enabled = $breaks_enabled; $this->breaks_enabled = $breaks_enabled;
@ -58,6 +66,12 @@ class Parsedown
# Public Methods # Public Methods
# #
/**
* Converts Markdown to HTML.
*
* @param string $text
* @return string
*/
function parse($text) function parse($text)
{ {
# simplifies line breaks # simplifies line breaks