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); }
/** * {@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);