Rand Stats

Cmark

github:khalidelboray

Cmark

Build Status

DESCRIPTION

A Raku binding (NOT COMPLETED) to the C lib cmark trying

INSTALL

Example

    use Cmark;
    my $options = CMARK_OPT_UNSAFE +| CMARK_OPT_SOURCEPOS  ;
    my $doc = Cmark.parse("# Header [hello](javascript:alert(1))",$options);
    say $doc.to-html();  # <h1 data-sourcepos="1:1-1:37">Header <a href="javascript:alert(1)">hello</a></h1>

Class Cmark Methods

OPTIONS

    enum OPTIONS is export (
        CMARK_OPT_DEFAULT => 0,
        CMARK_OPT_SOURCEPOS =>  1 +< 1,
        CMARK_OPT_HARDBREAKS  => 1 +< 2,
        CMARK_OPT_SAFE => 1 +< 3,
        CMARK_OPT_UNSAFE => 1 +< 17,
        CMARK_OPT_NOBREAKS => 1 +< 4,
        CMARK_OPT_NORMALIZE => 1 +< 8,
        CMARK_OPT_VALIDATE_UTF8 => 1 +< 9 ,
        CMARK_OPT_SMART => 1 +< 10
    );

Doc Methods

TODO