Semantic Dividers
unlistedby Aodaruma
Styles Markdown thematic breaks according to their source marker.
Semantic Dividers
Semantic Dividers is an Obsidian community plugin that gives Markdown thematic breaks different visual weights according to the marker used in the source.
| Markdown | Divider | Default appearance |
|---|---|---|
--- | Major | Full-width, strong spacing |
*** | Medium | Half-width, moderate spacing |
___ | Minor | Short, subtle spacing |
The note remains standard Markdown. If the plugin is disabled or the file is opened in another Markdown editor, every marker still renders as a normal thematic break.
Features
- Distinguishes dash, asterisk, and underscore thematic breaks.
- Supports Reading view and Live Preview.
- Leaves Source mode and the Markdown file unchanged.
- Uses Obsidian's syntax tree in Live Preview so frontmatter, fenced code blocks, and Setext headings are not decorated as dividers.
- Supports spaced thematic-break syntax such as
- - -,* * *, and_ _ _. - Provides commands for inserting each divider with normalized blank lines.
- Lets users configure width, thickness, opacity, margins, and line style.
- Works without external services, analytics, or vault writes.
- Uses browser-compatible APIs and is not desktop-only.
Installation
Manual installation
- Download
main.js,manifest.json, andstyles.cssfrom a release. - Create
<vault>/.obsidian/plugins/semantic-dividers/. - Copy the three files into that directory.
- Reload Obsidian.
- Enable Semantic Dividers under Settings → Community plugins.
The repository must have a release whose tag exactly matches the version in
manifest.json before release assets are available.
Usage
Write a thematic break on its own line, with a blank line before and after it:
Major topic change:
---
Medium section change:
***
Minor pause:
___
Longer runs of the same marker keep the same semantic level. For example,
***** is a medium divider. Spaced syntax can be disabled in the plugin
settings.
Commands
- Insert major divider inserts
---. - Insert medium divider inserts
***. - Insert minor divider inserts
___.
The commands add only the blank lines needed to keep the divider separate from surrounding paragraphs.
Settings
Each divider level has independent controls for:
- Enabled state
- Width
- Thickness
- Opacity
- Top and bottom margin
- Solid, dashed, dotted, or double line style
The Show Markdown on the active divider line setting follows normal Live Preview behavior by exposing the source marker while the cursor is on that line.
Parsing and compatibility
In Live Preview, the plugin decorates only nodes that Obsidian's CodeMirror
parser identifies as HorizontalRule. It does not turn arbitrary text into a
divider.
In Reading view, Obsidian no longer exposes the original marker on the rendered
<hr>. The plugin therefore reads the source section provided by the public
post-processor API and matches thematic breaks to rendered elements in order. It
applies no custom class when the mapping is ambiguous, leaving the theme's normal
horizontal rule intact.
Be aware of these Markdown rules and integrations:
- A dash line directly below paragraph text may be parsed as a Setext level-two heading. Put a blank line before a major divider.
- A linter that normalizes every thematic break to one marker removes the semantic distinction.
- Theme CSS can still influence colors through Obsidian's
--background-modifier-bordervariable. - HTML-authored
<hr>elements are intentionally left unchanged when they make source-to-DOM matching ambiguous.
Development
Requirements:
- Node.js 20 or later
- npm
npm install
npm test
npm run lint
npm run build
The production build writes main.js at the repository root. Build artifacts
are not committed; the release workflow builds and attaches them to a draft
GitHub release when a version tag is pushed.
The initial implementation was developed with Codex 5.6 sol.
Privacy and security
Semantic Dividers performs no network requests, collects no analytics, and does not read or modify vault files. It operates only on Markdown text and rendered elements already supplied to the editor and preview APIs.
Release status
Version 0.1.0 is the initial public release. Before submission to the Obsidian
Community directory, the plugin still needs manual verification in current
desktop and mobile Obsidian builds. The remaining checks are tracked in the
repository's issue tracker.
License
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.