Skip to content

Commit

Permalink
fix: Adds extends to the statblock editor suggest
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Apr 15, 2024
1 parent 5656f32 commit 39067b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/suggest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const STANDARD_FIELDS = [
"columns",
"forceColumns",
"columnWidth",
"columnHeight"
"columnHeight",
"extends"
];

export class StatblockSuggester extends EditorSuggest<string> {
Expand Down Expand Up @@ -204,9 +205,9 @@ export class StatblockSuggester extends EditorSuggest<string> {
query
};
}
if (/^(monster|creature):/.test(line)) {
if (/^(monster|creature|extends):/.test(line)) {
this._context = SuggestContext.Creature;
const match = line.match(/^(monster|creature):\s?(.*)\n?/);
const match = line.match(/^(monster|creature|extends):\s?(.*)\n?/);
if (!match) return null;
const [_, param, query] = match;

Expand Down

0 comments on commit 39067b0

Please sign in to comment.