public function render($content) { $parser = new Tx\Parser('html5'); $html = $this->getLayoutHead(); $html .= $parser->textileThis($content); $html .= $this->getLayoutFooter(); return $html; }
function smarty_block_textile($params, $content, $template, &$repeat) { if (!$repeat) { if (isset($content)) { $parser = new Parser(); return $parser->textileThis($content); } } }
/** * Parse and transform Textile strings into HTML * * @param string $string text to transform * @return string */ public static function textile($string) { // start measuring $hash = Debug::markStart('parsing', 'textile'); $parser = new Textile(); $result = $parser->textileThis($string); // end measuring Debug::markEnd($hash); Debug::increment('parses', 'textile'); return $result; }
/** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this controller is set as the default controller in * config/routes.php, it's displayed at http://example.com/ * * So any other public methods not prefixed with an underscore will * map to /index.php/welcome/<method_name> * @see http://codeigniter.com/user_guide/general/urls.html */ public function index() { // var_dump($this->ion_auth->user()->row()); $this->load->view('welcome_message'); $parser = new Textile\Parser(); $string = 'h1. Welcome' . PHP_EOL . PHP_EOL; $string .= '* List 1' . PHP_EOL; $string .= '* List 2' . PHP_EOL; $string .= '* List 3' . PHP_EOL; echo $parser->textileThis($string); }
/** * Parses content in a restricted mode. * * @param string|null $text The input document in textile format * @param bool|null $lite Optional flag to switch the parser into lite mode * @param bool|null $noimage Optional flag controlling the conversion of images into HTML img tags * @param string|null $rel Relationship to apply to all generated links * @return string The text from the input document */ public function textileRestricted($text, $lite = null, $noimage = null, $rel = null) { if ($lite === null) { $lite = get_pref('comments_use_fat_textile', 1); } if ($noimage === null) { $noimage = get_pref('comments_disallow_images', 1); } if ($rel === null && get_pref('comment_nofollow', 1)) { $rel = 'nofollow'; } return parent::textileRestricted($text, $lite, $noimage, $rel); }
/** * Parse the incoming template * * @param string $tpl Source template content * @param array $vars List of variables passed to template engine * * @return string Processed template */ public function render($tpl, $vars = array()) { return $this->textile->TextileThis($tpl); }
/** * {@inheritdoc} */ public function convert(ConverterContextInterface $converterContext) { $converterContext->setContent($this->parser->textileThis($converterContext->content())); }
/** * @TODO * @TODO Test * @return Document */ public function render() { switch ($this->format) { case 'html': $this->output = $this->body; break; case 'textile': $parser = new Textile(); $this->output = $parser->textileThis($this->body); break; default: // 'md' $parser = new Markdown(); $this->output = $parser->text($this->body); } return $this; }
function smarty_modifier_textile($string) { $parser = new Parser(); return $parser->textileThis($string); }
/** * Parse Content * * @param string $content * @return string */ public static function parse($content) { $parser = new Parser(); return $parser->textileThis($content); }
<?php require_once 'Netcarver/Textile/DataBag.php'; require_once 'Netcarver/Textile/Tag.php'; require_once 'Netcarver/Textile/Parser.php'; use Netcarver\Textile\Parser as Textile; $c = ""; if (isset($_REQUEST['c'])) { $c = $_REQUEST['c']; } if (isset($_POST['c'])) { $c = $_POST['c']; } $textile = new Textile(); echo $textile->textileThis($c);