mirror of
https://github.com/takitsuba/obsidian-auto-bullet.git
synced 2026-07-22 05:42:45 +00:00
Prevent bullet point insertion on heading lines
This commit is contained in:
parent
a321f09461
commit
930d0ace23
1 changed files with 8 additions and 0 deletions
8
main.ts
8
main.ts
|
|
@ -166,6 +166,14 @@ export default class AutoBulletPlugin extends Plugin {
|
|||
return;
|
||||
}
|
||||
|
||||
// Check if the line is a heading
|
||||
const isHeading = line.trim().startsWith('#');
|
||||
|
||||
// If the line is a heading, do not add bullet points
|
||||
if (isHeading) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the last character typed was a space (half-width or full-width) or tab
|
||||
// and if the corresponding setting is enabled
|
||||
if ((lastChar === ' ' && this.settings.enableHalfWidthSpace) ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue