├── lib ├── assets │ └── javascripts │ │ └── .gitkeep ├── markdown-it-html5-embed.rb └── index.js ├── Gemfile ├── .gitignore ├── Gemfile.lock ├── test ├── fixtures │ ├── with-auto-append.txt │ ├── link-syntax-http-disabled.txt │ ├── with-placeholder-syntax.txt │ ├── with-handlebars.txt │ ├── link-syntax.txt │ ├── link-syntax-http-enabled.txt │ ├── mime-filter.txt │ ├── image-syntax-custom-messages.txt │ ├── image-syntax-with-translation.txt │ └── image-syntax.txt └── test.js ├── Rakefile ├── Changelog.md ├── bower.json ├── markdown-it-html5-embed.gemspec ├── package.json ├── README.md ├── LICENSE └── yarn.lock /lib/assets/javascripts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gemspec name: "markdown-it-html5-embed" 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | lib/assets/javascripts/markdown-it-html5-embed.js 3 | .idea 4 | pkg/ 5 | node_modules/ 6 | -------------------------------------------------------------------------------- /lib/markdown-it-html5-embed.rb: -------------------------------------------------------------------------------- 1 | module MarkdownItHtml5Embed 2 | class Engine < ::Rails::Engine 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: . 3 | specs: 4 | markdown-it-html5-embed (1.0.0) 5 | 6 | GEM 7 | remote: https://rubygems.org/ 8 | specs: 9 | rake (12.3.3) 10 | 11 | PLATFORMS 12 | ruby 13 | 14 | DEPENDENCIES 15 | bundler (~> 1.16) 16 | markdown-it-html5-embed! 17 | rake (~> 12) 18 | 19 | BUNDLED WITH 20 | 1.16.1 21 | -------------------------------------------------------------------------------- /test/fixtures/with-auto-append.txt: -------------------------------------------------------------------------------- 1 | 2 | . 3 | [test link](https://example.com/file.webm) 4 | . 5 |

test link

6 | 11 | . 12 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | begin 2 | require "bundler/setup" 3 | rescue LoadError 4 | puts "You must `gem install bundler` and `bundle install` to run rake tasks" 5 | end 6 | 7 | 8 | desc "Build gem into the pkg directory" 9 | task :build do 10 | FileUtils.cp("dist/markdown-it-html5-embed.js", "lib/assets/javascripts") 11 | 12 | FileUtils.rm_rf("pkg") 13 | Dir["*.gemspec"].each do |gemspec| 14 | system "gem build #{gemspec}" 15 | end 16 | FileUtils.mkdir_p("pkg") 17 | FileUtils.mv(Dir["*.gem"], "pkg") 18 | end 19 | -------------------------------------------------------------------------------- /test/fixtures/link-syntax-http-disabled.txt: -------------------------------------------------------------------------------- 1 | Video with link syntax: 2 | . 3 | [test link](http://example.com/file.webm) 4 | . 5 |

test link

6 | . 7 | 8 | Video with link syntax (no text label): 9 | . 10 | [](http://example.com/file.webm) 11 | . 12 |

13 | . 14 | 15 | Check usual link is not broken: 16 | . 17 | [test link](http://example.com/file.php) 18 | . 19 |

test link

20 | . 21 | -------------------------------------------------------------------------------- /Changelog.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | 3 | - Drop explicit support for Handlebars 4 | - Instead support overriding of a built-in render function 5 | - Allow enabling/disabling embeds with `http://` URLs. Default is disable. 6 | 7 | ## 0.5.0 8 | 9 | - Don't depend on lodash anymore (#6) 10 | - Support for auxiliary strings translations (#7) 11 | - Don't render titles where inside audio/video tags fallback area (#7) 12 | 13 | ## 0.4.0 14 | 15 | - Introduced new non-inline mode with optional auto append feature 16 | - Old snake-case configuration option names are removed 17 | -------------------------------------------------------------------------------- /test/fixtures/with-placeholder-syntax.txt: -------------------------------------------------------------------------------- 1 | 2 | . 3 | [test link](https://example.com/file.webm) 4 | 5 | [[html5media]] 6 | . 7 |

test link

8 | 13 | . 14 | 15 | . 16 | plain text 17 | 18 | [[html5media]] 19 | . 20 |

plain text

21 | . 22 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "markdown-it-html5-embed", 3 | "version": "1.0.0", 4 | "homepage": "https://github.com/cmrd-senya/markdown-it-html5-embed", 5 | "authors": [ 6 | "comrade Senya ", 7 | "Phyo Arkar Lwin " 8 | ], 9 | "description": "This is a plugin for markdown-it which adds support for embedding audio/video in the HTML5 way, by using