Skip to content

Commit e492c5e

Browse files
claude: Update engine template with new claimsLanguage signature
Update the `quarto create extension engine` template to reflect the new claimsLanguage signature that accepts an optional firstClass parameter and returns boolean | number for priority-based selection. No behavioral change - just updated signature and documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a20557b commit e492c5e

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎src/resources/create/extensions/engine/src/qstart-filesafename-qend.ejs.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@ const exampleEngineDiscovery: ExecutionEngineDiscovery = {
5252
return false;
5353
},
5454

55-
claimsLanguage: (language: string) => {
56-
// This engine claims cells with its own language name
55+
claimsLanguage: (
56+
language: string,
57+
_firstClass?: string,
58+
): boolean | number => {
59+
// This engine claims cells with its own language name.
60+
// The optional firstClass parameter allows claiming based on code block class
61+
// (e.g., {python.myengine} would have firstClass="myengine").
62+
// Return a number > 1 to override other engines that also claim this language.
5763
return language.toLowerCase() === kCellLanguage.toLowerCase();
5864
},
5965

0 commit comments

Comments
 (0)