SomMark v3 is a simple, flexible markup language for structured content.
Test SomMark live in your browser:
https://adam-elmi.github.io/SomMark-Playground/
SomMark v3 is faster, more powerful, and easier to extend.
- HTML Support: Full HTML5 Support
- Markdown Support: Full Markdown Support
- JSON Support: Full JSON Support
- MDX Support: Full MDX Support
- Plugin System: Add new features without changing the core code.
- Modular Support: Easily import files and use variables.
- Type-Safe Rules: Set requirements for tags and attributes.
- Clean Syntax: Simplified block, atblock & inline rules and better error handling.
npm install -g sommarkSomMark is designed to be readable and clear.
# Html
[h1]Welcome to SomMark v3[end]
[section = class: "hero", id: "main"]
[a = href: "https://sommark.org"]Visit Website[end]
[end]
# Markdown
[quote]
SomMark is simple and powerful.
[end]
[bold]Check out our syntax guide![end]
# Json
[Json= object]
[Object = "user"]
(name)->(string: "Adam Elmi")
(age)->(number: 25)
(is_active_user)->(bool: true)
[end]
[end]import SomMark from "sommark";
const smark = new SomMark({
src: '[h1]Hello World[end]',
format: "html"
});
console.log(await smark.transpile());Read our detailed guides in the docs/ folder:
- Syntax Guide: How to write SomMark (Blocks, Inline, At-Blocks).
- Plugin System: How to create your own plugins.
- Built-in Plugins: Guide to standard plugins.
- Core API: How to use SomMark in your code.
- Mapper API: How to create new output formats.
- CLI Reference: Terminal commands and flags.
- API Quick Reference: Fast lookup for all functions.
High-quality syntax highlighting and diagnostics are provided via LSP Semantic Tokens. This ensures perfect coloring in any editor that supports the Language Server Protocol (e.g., VS Code, Neovim, CoC).
Information for integration can be found in the SomMark-LSP project.
