Skip to content

Commit

Permalink
Chore: Allow 000*.rpy files in renpy/common (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
a2937 authored and duckdoom4 committed May 12, 2023
1 parent 7b8bbc9 commit f1da4e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function refreshDiagnostics(doc: TextDocument, diagnosticCollection: Diag

const filename = extractFilename(doc.uri.path);
if (filename) {
if (!filename.match(/^[a-zA-Z0-9]/) || filename.startsWith("00")) {
if ((!filename.match(/^[a-zA-Z0-9]/) || filename.startsWith("00")) && !doc.uri.path.includes("renpy/common")) {
const invalidRange = new Range(0, 0, doc.lineCount, 0);
const range = doc.validateRange(invalidRange);
const diagnostic = new Diagnostic(range, "Filenames must begin with a letter or number, but may not begin with '00' as Ren'Py uses such files for its own purposes.", severity);
Expand Down

0 comments on commit f1da4e1

Please sign in to comment.