From 3bc1d8cf5bd2069b66d393d8dcad55c871d7c456 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Fri, 2 Nov 2018 10:31:20 -0400 Subject: [PATCH] Ben/add code sandbox (#1053) * Add codesandbox support * Fix codesandbox hastiness --- app/liquid_tags/codesandbox_tag.rb | 5 +++-- app/views/pages/_editor_guide_text.html.erb | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/liquid_tags/codesandbox_tag.rb b/app/liquid_tags/codesandbox_tag.rb index fb44699a4..a2cd02485 100644 --- a/app/liquid_tags/codesandbox_tag.rb +++ b/app/liquid_tags/codesandbox_tag.rb @@ -18,7 +18,8 @@ class CodesandboxTag < LiquidTagBase if valid_id?(input_no_space) input_no_space else - raise StandardError, "Invalid repl.it Id" + raise StandardError, "Invalid codesandbox Id" + end end @@ -27,4 +28,4 @@ class CodesandboxTag < LiquidTagBase end end -Liquid::Template.register_tag("codesandbox", CodesandboxTag) \ No newline at end of file +Liquid::Template.register_tag("codesandbox", CodesandboxTag) diff --git a/app/views/pages/_editor_guide_text.html.erb b/app/views/pages/_editor_guide_text.html.erb index 7b7e3338a..7f714f13f 100644 --- a/app/views/pages/_editor_guide_text.html.erb +++ b/app/views/pages/_editor_guide_text.html.erb @@ -132,7 +132,7 @@

repl.it Embed

All you need is the URL after the domain name:

- {% replit @WigWog/PositiveFineOpensource %} + {% codesandbox @WigWog/PositiveFineOpensource %}

Instagram Embed

All you need is the Instagram post id from the URL.