o
odin.langpkg.dev
packages / library / emmet

emmet

a2b35d5library

An implementation of emmet in Odin

MIT · updated 6 months ago

emmet

Description

A not so strict implementation of emmet written in Odin

Usage

  • Binary
     git clone https://github.com/Creativty/emmet
     cd emmet
     odin build .
     ./emmet "body>main>p{Hellope}^footer"
  • Library: remove the main.odin file
     package main
     
     import "core:fmt"
     import "path/to/emmet"
    
     main :: proc() {
     	html := emmet.eval("body>main>p{Hellope}^footer")
     	defer delete(html)
    
     	fmt.print(html)
     }

Features

  • Tags div
  • Classes .
  • ID #
  • Children >
  • Siblings +
  • Climb-Up ^
  • Text nodes {Hellope!}
  • Attributes [word=value double-quotes="value" single-quotes='value']

Caution

  • May, and will contain bugs.
  • Does not support all emmet features.

Contribution

  • Feel free to open an Issue, in case of a bug, feature request, or inquiry.
  • Pull Requests are welcomed, Do not expect timely responses and/or reviews.