mirror of
https://github.com/rabirabirara/obsidian-jelly-snippets.git
synced 2026-07-22 07:30:22 +00:00
fix: getSnippetType now properly ORs a number
The importance of writingn unit tests.
This commit is contained in:
parent
b10ec1ade3
commit
998489b576
1 changed files with 2 additions and 2 deletions
4
main.ts
4
main.ts
|
|
@ -339,8 +339,8 @@ export default class JellySnippets extends Plugin {
|
|||
let { lhs, rhs } = snippet;
|
||||
let type = SnippetType.SLSR;
|
||||
// Compiler doesn't complain if we convert boolean to number with unary '+'.
|
||||
type |= +lhs.contains("\n") && SnippetType.MLSR;
|
||||
type |= +rhs.info.hasNewline && SnippetType.SLMR;
|
||||
type |= +lhs.includes("\n") ? SnippetType.MLSR : 0;
|
||||
type |= +rhs.info.hasNewline ? SnippetType.SLMR : 0;
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue