dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fix param type of search terms in search related classes"
[lhc/web/wiklou.git]
/
includes
/
content
/
WikiTextStructure.php
diff --git
a/includes/content/WikiTextStructure.php
b/includes/content/WikiTextStructure.php
index
1128d7b
..
2f3a6f6
100644
(file)
--- a/
includes/content/WikiTextStructure.php
+++ b/
includes/content/WikiTextStructure.php
@@
-31,9
+31,9
@@
class WikiTextStructure {
'audio', 'video',
// CSS stylesheets aren't content
'style',
'audio', 'video',
// CSS stylesheets aren't content
'style',
- // The [1] for references
+ // The [1] for references
from Cite
'sup.reference',
'sup.reference',
- // The ↑ next to references in the references section
+ // The ↑ next to references in the references section
from Cite
'.mw-cite-backlink',
// Headings are already indexed in their own field.
'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
'.mw-cite-backlink',
// Headings are already indexed in their own field.
'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
@@
-41,7
+41,9
@@
class WikiTextStructure {
'.autocollapse',
// Content explicitly decided to be not searchable by editors such
// as custom navigation templates.
'.autocollapse',
// Content explicitly decided to be not searchable by editors such
// as custom navigation templates.
- '.navigation-not-searchable'
+ '.navigation-not-searchable',
+ // User-facing interface code prompting the user to act from WikibaseMediaInfo
+ '.wbmi-entityview-emptyCaption',
];
/**
];
/**
@@
-152,7
+154,7
@@
class WikiTextStructure {
'enableSectionEditTokens' => false,
'allowTOC' => false,
] );
'enableSectionEditTokens' => false,
'allowTOC' => false,
] );
- if (
strlen( $text ) == 0
) {
+ if (
$text === ''
) {
$this->allText = "";
// empty text - nothing to seek here
return;
$this->allText = "";
// empty text - nothing to seek here
return;
@@
-161,10
+163,6
@@
class WikiTextStructure {
$this->openingText = $this->extractHeadingBeforeFirstHeading( $text );
$this->openingText = $this->extractHeadingBeforeFirstHeading( $text );
- // Add extra spacing around break tags so text crammed together like<br>this
- // doesn't make one word.
- $text = str_replace( '<br', "\n<br", $text );
-
$formatter = new HtmlFormatter( $text );
// Strip elements from the page that we never want in the search text.
$formatter = new HtmlFormatter( $text );
// Strip elements from the page that we never want in the search text.