Skip to content

Commit

Permalink
fix: Remove ?
Browse files Browse the repository at this point in the history
  • Loading branch information
flovogt committed Apr 17, 2024
1 parent 03dfe06 commit fbf9e23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/linter/yaml/YamlLinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class YamlLinter {
async lint() {
try {
// Split Yaml file into part documents by '---' separator
const allDocuments: string[] = this.#content.split(/(?:\r?\n|\r|\n)---/g);
const allDocuments: string[] = this.#content.split(/(?:\r\n|\r|\n)---/g);

// Calculate the starting line number of each part document
let lineNumberOffset = 0;
Expand All @@ -46,7 +46,7 @@ export default class YamlLinter {
// Analyze part content with line number offset
this.#analyzeYaml(parsedYamlWithPosInfo, lineNumberOffset);
// Update line number offset for next part
lineNumberOffset += document.split(/\r?\n|\r|\n/g).length;
lineNumberOffset += document.split(/\r\n|\r|\n/g).length;
});
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
Expand Down

0 comments on commit fbf9e23

Please sign in to comment.