mirror of
https://github.com/friendica/friendica
synced 2025-04-26 01:50:11 +00:00
Line endings are converted to unix style
This commit is contained in:
parent
164f4f7cdf
commit
15a857e411
35 changed files with 1484 additions and 1484 deletions
|
@ -1,39 +1,39 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file src/Content/Text/Markdown.php
|
||||
*/
|
||||
|
||||
namespace Friendica\Content\Text;
|
||||
|
||||
use Friendica\BaseObject;
|
||||
use Michelf\MarkdownExtra;
|
||||
|
||||
/**
|
||||
* Friendica-specific usage of Markdown
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
*/
|
||||
class Markdown extends BaseObject
|
||||
{
|
||||
/**
|
||||
* Converts a Markdown string into HTML. The hardwrap parameter maximizes
|
||||
* compatibility with Diaspora in spite of the Markdown standard.
|
||||
*
|
||||
* @brief Converts a Markdown string into HTML
|
||||
* @param string $text
|
||||
* @param bool $hardwrap
|
||||
* @return string
|
||||
*/
|
||||
public static function convert($text, $hardwrap = true) {
|
||||
$stamp1 = microtime(true);
|
||||
|
||||
$MarkdownParser = new MarkdownExtra();
|
||||
$MarkdownParser->hard_wrap = $hardwrap;
|
||||
$html = $MarkdownParser->transform($text);
|
||||
|
||||
self::getApp()->save_timestamp($stamp1, "parser");
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file src/Content/Text/Markdown.php
|
||||
*/
|
||||
|
||||
namespace Friendica\Content\Text;
|
||||
|
||||
use Friendica\BaseObject;
|
||||
use Michelf\MarkdownExtra;
|
||||
|
||||
/**
|
||||
* Friendica-specific usage of Markdown
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
*/
|
||||
class Markdown extends BaseObject
|
||||
{
|
||||
/**
|
||||
* Converts a Markdown string into HTML. The hardwrap parameter maximizes
|
||||
* compatibility with Diaspora in spite of the Markdown standard.
|
||||
*
|
||||
* @brief Converts a Markdown string into HTML
|
||||
* @param string $text
|
||||
* @param bool $hardwrap
|
||||
* @return string
|
||||
*/
|
||||
public static function convert($text, $hardwrap = true) {
|
||||
$stamp1 = microtime(true);
|
||||
|
||||
$MarkdownParser = new MarkdownExtra();
|
||||
$MarkdownParser->hard_wrap = $hardwrap;
|
||||
$html = $MarkdownParser->transform($text);
|
||||
|
||||
self::getApp()->save_timestamp($stamp1, "parser");
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue