Skip to content

Commit 5963b0b

Browse files
committed
[conf] term index by slash
1 parent 1822c29 commit 5963b0b

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

confs/schemas.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
INDEXER_REGSITRY['hyphen'] = PathIndexer('-', 1)
88
INDEXER_REGSITRY['hyphen2'] = PathIndexer('-', 2)
9+
INDEXER_REGSITRY['slash'] = PathIndexer('/', 1)
910

1011
OBJECT_TYPES = {
1112
'friend': {
@@ -120,7 +121,7 @@
120121
'schema': {
121122
'name': 'lines of str, required, ref',
122123
'attrs': {
123-
'field': 'str, ref, index by slash', # TODO: index by slash
124+
'field': 'str, ref, index by slash',
124125
'enwiki': 'str',
125126
'zhwiki': 'str',
126127
'hide': 'bool',

confs/templates/term.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% if hide -%}
2-
{% if field %}:领域: :term.field+by-path:`{{ field }} <{{ field }}>`{% endif %}
2+
{% if field %}:领域: :term.field+by-slash:`{{ field }} <{{ field }}>`{% endif %}
33
{% if enwiki %}:维基: :enwiki:`{{ enwiki }}`{% endif %}
44
{% if zhwiki %}:维基: :zhwiki:`{{ zhwiki }}`{% endif %}
55
{%- endif %}

0 commit comments

Comments
 (0)