Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/plugins/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ export function genIndex(path, content = '', router, depth) {
index[slug] = {slug, title: '', body: ''}
} else if (index[slug].body) {
index[slug].body += '\n' + (token.text || '')
} else if (token.type === 'table'){
var tableString = '|';
token.cells.forEach(function (rows) {
rows.forEach(function(cell) {
tableString += ' ' + cell + ' |';
});
});
index[slug].body = tableString;
} else {
index[slug].body = token.text
}
Expand Down