~ubuntu-branches/ubuntu/saucy/horde3/saucy

« back to all changes in this revision

Viewing changes to lib/Horde/Text/Filter/rst.php

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2005-05-04 23:08:08 UTC
  • Revision ID: james.westby@ubuntu.com-20050504230808-p4hf3hk28o3v7wir
Tags: upstream-3.0.4
ImportĀ upstreamĀ versionĀ 3.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
require_once 'Text/reST.php';
 
4
require_once 'Text/reST/Formatter.php';
 
5
 
 
6
/**
 
7
 * The Text_Filter_rst:: class converts reStructuredText to HTML.
 
8
 *
 
9
 * $Horde: framework/Text_Filter/Filter/rst.php,v 1.9.10.2 2005/01/11 20:44:48 chuck Exp $
 
10
 *
 
11
 * Copyright 2003-2005 Jason M. Felice <jfelice@cronosys.com>
 
12
 *
 
13
 * See the enclosed file COPYING for license information (LGPL). If you did not
 
14
 * receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 
15
 *
 
16
 * @author  Jason M. Felice <jfelice@cronosys.com>
 
17
 * @package Horde_Text
 
18
 */
 
19
class Text_Filter_rst extends Text_Filter {
 
20
 
 
21
    /**
 
22
     * Executes any code necessaray after applying the filter
 
23
     * patterns.
 
24
     *
 
25
     * @param string $text  The text after the filtering.
 
26
     *
 
27
     * @return string  The modified text.
 
28
     */
 
29
    function postProcess($text)
 
30
    {
 
31
        $document = &Text_reST::parse($text);
 
32
        $formatter = &Text_reST_Formatter::factory('html');
 
33
        return $formatter->format($document, NLS::getCharset());
 
34
    }
 
35
 
 
36
}