@@ -36,7 +36,13 @@ export const frontmatterLiquidSyntax = {
|
||||
// Add the key length plus 3 to the column number to account colon and
|
||||
// for the space after the key and column number starting at 1.
|
||||
// If there is no space after the colon, a YAMLException will be thrown.
|
||||
const range = [columnNumber + key.length + 3, value.length]
|
||||
const startRange = columnNumber + key.length + 3
|
||||
// If the range is greater than the length of the line, we need to adjust the range to the end of the line
|
||||
const endRange =
|
||||
startRange + value.length - 1 > params.lines[lineNumber - 1].length
|
||||
? params.lines[lineNumber - 1].length - startRange + 1
|
||||
: value.length
|
||||
const range = [startRange, endRange]
|
||||
addError(
|
||||
onError,
|
||||
lineNumber,
|
||||
|
||||
@@ -84,6 +84,8 @@ export async function getSearchResults({
|
||||
const matchQuery = {
|
||||
bool: {
|
||||
should: matchQueries,
|
||||
// This allows filtering by toplevel later.
|
||||
minimum_should_match: 1,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user