Text_Wiki
[ class tree: Text_Wiki ] [ index: Text_Wiki ] [ all elements ]

Class: Text_Wiki_Parse_Emphasis

Source Location: /Text_Wiki_Mediawiki-0.1.0/Text/Wiki/Parse/Mediawiki/Emphasis.php

Class Overview

Text_Wiki_Parse
   |
   --Text_Wiki_Parse_Emphasis

Emphazised text rule parser class for Mediawiki. Makes Emphasis, Strong or both This class implements a Text_Wiki_Parse to find source text marked for emphasis, stronger and very as defined by text surrounded by 2,3 or 5 single-quotes.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005 bertrand Gugger

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 38]
Emphazised text rule parser class for Mediawiki. Makes Emphasis, Strong or both This class implements a Text_Wiki_Parse to find source text marked for emphasis, stronger and very as defined by text surrounded by 2,3 or 5 single-quotes.

On parsing, the text itself is left in place, but the starting and ending instances of the single-quotes are replaced with tokens.



[ Top ]


Class Variables

$regex =  "/(?<!')'('{1,4})(.*?)\\1'(?!')/"

[line 49]

The regular expression used to parse the source text and find matches conforming to this rule. Used by the parse() method.

We match '' , ''' or ''''' embeded texts

  • See: Text_Wiki_Parse::parse()
  • Access: public

Type:   string


[ Top ]



Method Detail

process   [line 62]

string process( array &$matches)

Generates a replacement for the matched text. Token options are:
  • 'type' => ['start'|'end'] The starting or ending point of the emphasized text.

Generated tokens are Emphasis (this rule), Strong or Emphasis / Strong The text itself is left in the source but may content bested blocks

  • Return: Delimited by start/end tokens to be used as placeholder in the source text surrounding the text to be emphasized.
  • Access: public

Parameters:

array   &$matches   —  The array of matches from parse().

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:38:57 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.