Skip to content

About

CodeMirror 6 language support for decktile Markdown slide decks

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

@decktile/lezer-decktile

CodeMirror 6 language support for decktile Markdown slide decks (*.deck.md), built as a @lezer/markdown extension.

  • YAML frontmatter, highlighted as YAML.
  • --- slide breaks (never read as setext headings).
  • @kicker, @layout, @transition and other @ directives.
  • ::: grid {cols=2} / ::: card fences and their attributes.
  • Code blocks in their own language; ```pdg uses @predictygraph/lezer-pdg, the rest comes from @codemirror/language-data.

Mirrors tree-sitter-decktile.

Use

npm install @decktile/lezer-decktile
import { EditorView, basicSetup } from "codemirror";
import { decktile } from "@decktile/lezer-decktile";

new EditorView({ doc: "---\ntitle: Demo\n---\n\n# Hello\n@kicker KubeCon\n", extensions: [basicSetup, decktile()], parent: document.body });

Also exported: decktileSyntax (the MarkdownConfig, for your own markdown({ extensions }) setup) and codeLanguage(info) (the code block language lookup).

Develop

npm ci
make check test
DECKS=../talks npm test   # also parse every *.deck.md there

Release: make release V=patch|minor|major tags and pushes; the release workflow publishes to npm.

License

Apache-2.0

About

CodeMirror 6 language support for decktile Markdown slide decks

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages