wiki.techinc.nl/includes/content
Kunal Mehta 85034abca5 content: Refactor normalization of line endings code
The code that normalizes line endings ("\r\n" and "\r" to "\n") and
trims trailing whitespace is buried in Parser::preSaveTransform(), and
was duplicated to TextContent in 96b6afb31d, as non-wikitext content
models should still be normalizing line endings.

This splits the duplicated code into
TextContent::normalizeLineEndings(), and utilize it in the Parser.
Additionally, expand the documentation of
TextContent::preSaveTransform() to document that subclasses should make
sure they normalize line endings during the PST stage.

And remove a useless rtrim() call from WikitextContent that did nothing.

Change-Id: I9094c671d4bbd23d75436f8f1d682d6dd6e6d2fc
2016-08-23 11:09:59 -07:00
..
AbstractContent.php Fix a few incorrect annotations 2016-06-30 17:50:40 -07:00
CodeContentHandler.php Call parent::getFieldsForSearchIndex in ContentHandlers 2016-08-15 19:33:09 -04:00
Content.php Add missing null type hints to Content::isCountable and implementations 2016-02-25 14:13:22 +01:00
ContentHandler.php Merge "Extract ParserOutput search index data fields from WikiTextContentHandler" 2016-08-19 18:40:17 +00:00
CssContent.php Implement redirects in CssContent 2015-07-28 17:53:47 +00:00
CssContentHandler.php content: Use "::class" when overriding TextContent::getContentClass() 2016-08-12 21:16:37 -07:00
JavaScriptContent.php Support redirects in JavaScriptContent 2015-07-20 15:36:49 +00:00
JavaScriptContentHandler.php content: Use "::class" when overriding TextContent::getContentClass() 2016-08-12 21:16:37 -07:00
JsonContent.php content: Refactor normalization of line endings code 2016-08-23 11:09:59 -07:00
JsonContentHandler.php content: Use "::class" when overriding TextContent::getContentClass() 2016-08-12 21:16:37 -07:00
MessageContent.php Add missing null type hints to Content::isCountable and implementations 2016-02-25 14:13:22 +01:00
TextContent.php content: Refactor normalization of line endings code 2016-08-23 11:09:59 -07:00
TextContentHandler.php Call parent::getFieldsForSearchIndex in ContentHandlers 2016-08-15 19:33:09 -04:00
WikitextContent.php content: Refactor normalization of line endings code 2016-08-23 11:09:59 -07:00
WikitextContentHandler.php Merge "Extract ParserOutput search index data fields from WikiTextContentHandler" 2016-08-19 18:40:17 +00:00
WikiTextStructure.php Extract ParserOutput search index data fields from WikiTextContentHandler 2016-08-19 09:26:17 -04:00