Skip to content

Commit

Permalink
Add indentation rules
Browse files Browse the repository at this point in the history
Resolves #24
  • Loading branch information
rahulyadav-57 committed Apr 22, 2024
1 parent 712f4a1 commit e3f0cfe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utility/syntaxHighlighter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ export async function highlightCodeSnippets(

let languageConfiguration: monaco.languages.LanguageConfiguration = {
comments: commentRules[language] as any,
indentationRules: {
decreaseIndentPattern: /^\s*\}.*$/,
increaseIndentPattern: /^.*\{[^}]*$/,
},
};

if (language === 'tact') {
Expand Down

0 comments on commit e3f0cfe

Please sign in to comment.