Skip to content

Commit

Permalink
Merge pull request #21 from github/bump-commonmarker
Browse files Browse the repository at this point in the history
Bump commonmarker to the latest version
  • Loading branch information
yoannchaudet authored Mar 3, 2022
2 parents fcd4e0b + 8097a88 commit 3acf053
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 55 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Automatically add our team to each pull request in this repo
* @github/pages-reviewers
17 changes: 17 additions & 0 deletions .github/workflows/cibuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on: push
name: cibuild
jobs:
build:
name: Test
strategy:
matrix:
ruby: [2.6, 2.7]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: script/cibuild
run: script/cibuild
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
Gemfile.lock
spec/dest
.bundle
vendor/
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
*GitHub Flavored Markdown converter for Jekyll, based on [`jekyll-commonmark`](https://github.com/jekyll/jekyll-commonmark)*

[![Gem Version](https://img.shields.io/gem/v/jekyll-commonmark-ghpages.svg)](https://rubygems.org/gems/jekyll-commonmark-ghpages)
[![Build Status](https://img.shields.io/travis/github/jekyll-commonmark-ghpages/master.svg)](https://travis-ci.org/github/jekyll-commonmark-ghpages)
[![Windows Build status](https://img.shields.io/appveyor/ci/github/jekyll-commonmark-ghpages/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/github/jekyll-commonmark-ghpages)
[![Build Status](https://github.com/github/jekyll-commonmark-ghpages/actions/workflows/cibuild.yaml/badge.svg)](https://github.com/github/jekyll-commonmark-ghpages/actions/workflows/cibuild.yaml)

Jekyll Markdown converter that uses [libcmark-gfm](https://github.com/github/cmark), GitHub's fork of [cmark](https://github.com/commonmark/cmark), the reference parser for CommonMark, with some additions to ensure compatibility with existing Kramdown-based sites.

Expand All @@ -30,6 +29,8 @@ To specify extensions and options for use in converting Markdown to HTML, supply
```yaml
commonmark:
options: ["SMART", "FOOTNOTES"]
options: ["UNSAFE", "SMART", "FOOTNOTES"]
extensions: ["strikethrough", "autolink", "table", "tagfilter"]
```
⚠ The `UNSAFE` option is required for HTML rendering.
23 changes: 0 additions & 23 deletions appveyor.yml

This file was deleted.

11 changes: 6 additions & 5 deletions jekyll-commonmark-ghpages.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Gem::Specification.new do |spec|
spec.name = "jekyll-commonmark-ghpages"
spec.summary = "CommonMark generator for Jekyll"
spec.version = "0.1.6"
spec.authors = ["Ashe Connor"]
spec.email = "kivikakk@github.com"
spec.version = "0.2.0"
spec.authors = ["GitHub, Inc."]
spec.email = "support@github.com"
spec.homepage = "https://github.com/github/jekyll-commonmark-ghpages"
spec.licenses = ["MIT"]

Expand All @@ -14,8 +14,9 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_runtime_dependency "jekyll-commonmark", "~> 1.2"
spec.add_runtime_dependency "commonmarker", "~> 0.17.6"
spec.add_runtime_dependency "jekyll", "~> 3.9.0"
spec.add_runtime_dependency "jekyll-commonmark", "~> 1.4.0"
spec.add_runtime_dependency "commonmarker", "~> 0.23.4"
spec.add_runtime_dependency "rouge", ">= 2.0", "< 4.0"

spec.add_development_dependency "rspec", "~> 3.0"
Expand Down
10 changes: 10 additions & 0 deletions script/cibuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#!/bin/bash

# Update gems
gem update --system 3.2.3

# Install bundler
gem install bundler

# Install dependencies
bundle install

# Run tests
bundle exec rspec
4 changes: 2 additions & 2 deletions spec/test_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
let(:converter) { Jekyll::Converters::Markdown::CommonMarkGhPages.new(config) }
let(:config) {
{"commonmark" => {
"options" => ["SMART", "FOOTNOTES"],
"options" => ["UNSAFE", "SMART", "FOOTNOTES"],
"extensions" => ["tagfilter"],
}}
}
Expand All @@ -32,7 +32,7 @@

describe Jekyll::Renderer do
it "should not re-process markdown in a liquid tag" do
site = Jekyll::Site.new(Jekyll.configuration("markdown" => "CommonMarkGhPages"))
site = Jekyll::Site.new(Jekyll.configuration("markdown" => "CommonMarkGhPages", "commonmark" => { "options" => ["UNSAFE"] }))
collection = Jekyll::Collection.new(site, "pages")
document = Jekyll::Document.new("hello.md", site: site, collection: collection)
document.content = "**Hi**\n" \
Expand Down

0 comments on commit 3acf053

Please sign in to comment.