Skip to content

Adam-Elmi/SomMark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,330 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SomMark Cover

SomMark v3 is a simple, flexible markup language for structured content.

SomMark Playground Badge


Try SomMark Playground

Test SomMark live in your browser:
https://adam-elmi.github.io/SomMark-Playground/


What's new in v3?

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.

Installation

npm install -g sommark

Usage

v3 Syntax Example

SomMark 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]

Using in JavaScript

import SomMark from "sommark";

const smark = new SomMark({
	src: '[h1]Hello World[end]',
	format: "html"
});

console.log(await smark.transpile());

Documentation

Read our detailed guides in the docs/ folder:

Editor Support

Editor Support

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.

About

SomMark is a declarative, extensible markup language for structured content that can be converted to HTML, Markdown, MDX, JSON, and more.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors