Skip to content

IsSkyfalls/goldmark-media-tags

Repository files navigation

goldmark-media-tags

Go Reference

A media tags extension for GoldMark.

Inspired by flexmark-java <flexmark-ext-media-tags> (java)

Supports

<media>, <audio> and `.

!v[This is a video](https://example.org/test.webm)
!a[And this is an audio](https://example.org/test.mp3)
!p[And this a picture](https://example.org/test.png)

Renders to:

<p>
    <video controls>
        <source src="https://example.org/test.webm">
    </video>
    <audio controls>
        <source src="https://example.org/test.mp3">
    </audio>
    <picture>
        <img alt="And this a picture" src="https://example.org/test.png">
    </picture>
</p>

Usage

check extension_test.go