1
0
Fork 0
mirror of https://github.com/em-squared/5e-drs.git synced 2025-10-31 05:24:20 +00:00
This commit is contained in:
Maxime Moraine 2020-04-05 14:38:20 +02:00
parent 1050fbb531
commit 38931015db
71 changed files with 5819 additions and 184 deletions

View file

@ -32,6 +32,7 @@
<script>
import matchQuery from './match-query'
import { displaySchoolLevel } from '@theme/util/spellHelpers'
/* global SEARCH_MAX_SUGGESTIONS, SEARCH_PATHS, SEARCH_HOTKEYS */
export default {
@ -104,7 +105,15 @@ export default {
}
if (matchQuery(query, p)) {
res.push(p)
if (p.pid && p.pid == 'spell') {
res.push(Object.assign({}, p, {
subtitle: displaySchoolLevel(p.frontmatter),
title: p.title,
path: p.path
}))
} else {
res.push(p)
}
} else if (p.headers) {
for (let j = 0; j < p.headers.length; j++) {
if (res.length >= max) break