mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
@@ -112,7 +112,7 @@ var Stemmer = function() {
|
||||
len(word) == 0 or not (
|
||||
((len(word) < 3) and (12353 < ord(word[0]) < 12436)) or
|
||||
(ord(word[0]) < 256 and (
|
||||
len(word) < 3 or word in self.stopwords
|
||||
word in self.stopwords
|
||||
))))
|
||||
|
||||
|
||||
|
||||
@@ -143,6 +143,7 @@ def test_IndexBuilder():
|
||||
assert index._titles == {'docname': 'title', 'docname2': 'title2'}
|
||||
assert index._filenames == {'docname': 'filename', 'docname2': 'filename2'}
|
||||
assert index._mapping == {
|
||||
'ar': {'docname', 'docname2'},
|
||||
'fermion': {'docname', 'docname2'},
|
||||
'comment': {'docname', 'docname2'},
|
||||
'non': {'docname', 'docname2'},
|
||||
@@ -161,7 +162,8 @@ def test_IndexBuilder():
|
||||
'objects': {'': {'objdispname': (0, 0, 1, '#anchor')}},
|
||||
'objnames': {0: ('dummy', 'objtype', 'objtype')},
|
||||
'objtypes': {0: 'dummy:objtype'},
|
||||
'terms': {'comment': [0, 1],
|
||||
'terms': {'ar': [0, 1],
|
||||
'comment': [0, 1],
|
||||
'fermion': [0, 1],
|
||||
'index': [0, 1],
|
||||
'non': [0, 1],
|
||||
@@ -197,6 +199,7 @@ def test_IndexBuilder():
|
||||
assert index._titles == {'docname2': 'title2'}
|
||||
assert index._filenames == {'docname2': 'filename2'}
|
||||
assert index._mapping == {
|
||||
'ar': {'docname2'},
|
||||
'fermion': {'docname2'},
|
||||
'comment': {'docname2'},
|
||||
'non': {'docname2'},
|
||||
@@ -215,7 +218,8 @@ def test_IndexBuilder():
|
||||
'objects': {},
|
||||
'objnames': {0: ('dummy', 'objtype', 'objtype')},
|
||||
'objtypes': {0: 'dummy:objtype'},
|
||||
'terms': {'comment': 0,
|
||||
'terms': {'ar': 0,
|
||||
'comment': 0,
|
||||
'fermion': 0,
|
||||
'index': 0,
|
||||
'non': 0,
|
||||
@@ -261,4 +265,4 @@ def test_nosearch(app):
|
||||
assert index['docnames'] == ['index', 'nosearch', 'tocitem']
|
||||
assert 'latex' not in index['terms']
|
||||
assert 'zfs' in index['terms']
|
||||
assert index['terms']['zfs'] == 0 # zfs on nosearch.rst is not registered to index
|
||||
assert index['terms']['zfs'] == [] # zfs on nosearch.rst is not registered to index
|
||||
|
||||
Reference in New Issue
Block a user