Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 356 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HTMLPurifier_Injector_AutoParagraph:: (7 methods):
  _pStart()
  handleText()
  handleElement()
  _splitText()
  _isInline()
  _pLookAhead()
  _checkNeedsP()


Class: HTMLPurifier_Injector_AutoParagraph  - X-Ref

Injector that auto paragraphs text in the root node based on
double-spacing.

_pStart()   X-Ref

return: HTMLPurifier_Token_Start

handleText(&$token)   X-Ref

param: HTMLPurifier_Token_Text $token

handleElement(&$token)   X-Ref

param: HTMLPurifier_Token $token

_splitText($data, &$result)   X-Ref
Splits up a text in paragraph tokens and appends them
to the result stream that will replace the original

param: string $data String text data that will be processed
param: HTMLPurifier_Token[] $result Reference to array of tokens that the

_isInline($token)   X-Ref
Returns true if passed token is inline (and, ergo, allowed in
paragraph tags)

param: HTMLPurifier_Token $token
return: bool

_pLookAhead()   X-Ref
Looks ahead in the token list and determines whether or not we need
to insert a <p> tag.

return: bool

_checkNeedsP($current)   X-Ref
Determines if a particular token requires an earlier inline token
to get a paragraph. This should be used with _forwardUntilEndToken

param: HTMLPurifier_Token $current
return: bool