Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.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