1
0
mirror of synced 2026-01-01 00:04:41 -05:00

Merge pull request #33232 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-05-29 18:20:13 -07:00
committed by GitHub
2 changed files with 9 additions and 1 deletions

View File

@@ -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,

View File

@@ -84,6 +84,8 @@ export async function getSearchResults({
const matchQuery = {
bool: {
should: matchQueries,
// This allows filtering by toplevel later.
minimum_should_match: 1,
},
}