public function render($content)
 {
     $parser = new Tx\Parser('html5');
     $html = $this->getLayoutHead();
     $html .= $parser->textileThis($content);
     $html .= $this->getLayoutFooter();
     return $html;
 }
Example #2
0
function smarty_block_textile($params, $content, $template, &$repeat)
{
    if (!$repeat) {
        if (isset($content)) {
            $parser = new Parser();
            return $parser->textileThis($content);
        }
    }
}
Example #3
0
 /**
  * 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()));
 }
Example #6
0
 /**
  * @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;
 }
Example #7
0
function smarty_modifier_textile($string)
{
    $parser = new Parser();
    return $parser->textileThis($string);
}
Example #8
0
 /**
  * Parse Content
  *
  * @param  string $content
  * @return string
  */
 public static function parse($content)
 {
     $parser = new Parser();
     return $parser->textileThis($content);
 }
Example #9
0
File: c.php Project: ngtp/page
<?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);