Prevent bullet point insertion on heading lines

This commit is contained in:
Hiroo Takizawa 2025-03-23 20:28:03 +09:00
parent a321f09461
commit 930d0ace23

View file

@ -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) ||