diff --git a/README.md b/README.md index 5f92574..2ba3392 100644 --- a/README.md +++ b/README.md @@ -59,13 +59,21 @@ Thus plugin does not change how the code is rendered, it only inserts the link b Styling and positioning the button is up to you. No CSS is provided with this plugin. The CSS used in my example screenshot is: ```css -div.highlight a.playground { - position: absolute; - z-index: 10; - float: right; - right: 8px; - top: 8px; +.highlight div.playground { + text-align: right; outline: none; + padding: 6px; +} + +.highlight a.playground-btn { + border: 1px solid #555; + padding-left: 8px; + padding-right: 8px; + padding-top: 2px; + padding-bottom: 2px; + background-color: #eee; + color:#555; + } ``` diff --git a/lib/rust_playground_highlight.rb b/lib/rust_playground_highlight.rb index 7d9512f..847070c 100644 --- a/lib/rust_playground_highlight.rb +++ b/lib/rust_playground_highlight.rb @@ -4,7 +4,7 @@ class RustPlaygroundHighlight < HighlightBlock attr_accessor :raw, :gist_id def add_code_tag(code) - super.sub(/\n*<\/pre>/,"Run").strip + super.sub(/\n*<\/pre>/,"
Run in Rust Playground
").strip end def render(context) @@ -37,7 +37,7 @@ def self.build(rust_highlight_block) end def url - "https://play.rust-lang.org/?#{query_string}" + "https://play.rust-lang.org/?#{query_string}&edition=2018" end end diff --git a/rust_playground_highlight.gemspec b/rust_playground_highlight.gemspec index 7c16b1f..7db89cf 100644 --- a/rust_playground_highlight.gemspec +++ b/rust_playground_highlight.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |gem| gem.name = "rust_playground_highlight" - gem.version = '0.1.3' + gem.version = '0.1.4' gem.authors = ["IanWhitney"] gem.email = "ian@ianwhitney.com" gem.description = %q{Automatically add links to the Rust Playground for code samples in your Jekyll site.} @@ -17,5 +17,5 @@ Gem::Specification.new do |gem| gem.require_paths = ["lib"] gem.license = "MIT" - gem.add_dependency "jekyll", ">= 2.0", "< 4.0" + gem.add_dependency "jekyll", ">= 3.0", "<= 4.2" end