GitXplorerGitXplorer
k

koino

public
118 stars
13 forks
7 issues

Commits

List of commits on branch main.
Unverified
3840f0e81ebe7005630e1b839c24c29456f7a9a8

build.zig.zon: use https://github.com/kivikakk/libpcre.zig/commit/1dc32407368651bc0118b752288c3b87af12ff50.

kkivikakk committed 3 months ago
Unverified
dbfd809bedfe07d5b304de75db9ae0151b10e33c

workflows: remove brew install pcre.

kkivikakk committed 3 months ago
Verified
26b38766c96fc44757f45db8bddf8d57fbca09a4

Merge pull request #53 from kivikakk/use-source-libpcre

kkivikakk committed 3 months ago
Unverified
6ee59c7878f56442c1854d06f5bbaada9fabe8ca

workflows: add windows, use checkout v4, no submodules.

kkivikakk committed 3 months ago
Unverified
42ebb9dd750e9a9fb82282b445f5e256fd05722f

README: no libpcre.zig manual steps now!

kkivikakk committed 3 months ago
Unverified
33e7514b00ef42e784c1e02e92f7846fddc55e2c

.gitignore: /zig-cache back for 0.12.0.

kkivikakk committed 3 months ago

README

The README file for this repository.

Build status Spec Status: 671/671

Zig port of Comrak. Maintains 100% spec-compatibility with GitHub Flavored Markdown.

Getting started

Using koino as a library

  • Get Zig 0.12 https://ziglang.org/

  • Start a new project with zig init-exe / zig init-lib

  • Add koino via the zig package manager:

    $ zig fetch --save https://github.com/kivikakk/koino/archive/<commit hash>.tar.gz
  • Add the following to your build.zig's build function:

    const koino_pkg = b.dependency("koino", .{ .optimize = optimize, .target = target });
    exe.root_module.addImport("koino", koino_pkg.module("koino"));
  • Have a look at the bottom of parser.zig to see some test usage.

Using it as a CLI executable

  • Clone this repository:
    $ git clone https://github.com/kivikakk/koino
  • Build
    $ zig build
  • Use ./zig-out/bin/koino

For development purposes

  • Clone this repository with submodules for the cmark-gfm dependency:

    $ git clone --recurse-submodules https://github.com/kivikakk/koino
    $ cd koino
  • Build and run the spec suite.

    $ zig build test
    $ make spec

Usage

Command line:

$ koino --help
Usage: koino [-hu] [-e <EXTENSION>...] [--smart]

Options:
        -h, --help                      Display this help and exit
        -u, --unsafe                    Render raw HTML and dangerous URLs
        -e, --extension <EXTENSION>...  Enable an extension. (table,strikethrough,autolink,tagfilter)
            --smart                     Use smart punctuation.

Library:

Documentation is TODO — see LoLa for an example of use. Note also the build.zig declaration.