qiita-markdown 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20dde5cbdc1d2e970bb956c7b55ad0123e00dd95b2d60e4cdafd31782278c670
|
4
|
+
data.tar.gz: 4943b67271e3ad7e991815e22f867281e4e603ddb5641a013335d2d26b129089
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 971bb032fff9ca87fd6756a37c3dbae98229d2a8ae3363731252b7ad4d82924ee912ee817e1d8c9cd5f499983abae473485b7f33268805cdc5bcd21346a641c0
|
7
|
+
data.tar.gz: 8afc2a7c23fe930fd4865ff779ec4735365e565a5f09070b74b9fddb4616da613c4cfc4abc78116be759b79385ef261867275ea0f8a4f44456d282ddc3b27ce5
|
data/CHANGELOG.md
CHANGED
data/lib/qiita/markdown.rb
CHANGED
@@ -19,6 +19,7 @@ require "qiita/markdown/embed/speeker_deck"
|
|
19
19
|
require "qiita/markdown/embed/docswell"
|
20
20
|
require "qiita/markdown/embed/figma"
|
21
21
|
require "qiita/markdown/embed/stack_blitz"
|
22
|
+
require "qiita/markdown/embed/blueprint_ue"
|
22
23
|
require "qiita/markdown/transformers/filter_attributes"
|
23
24
|
require "qiita/markdown/transformers/filter_script"
|
24
25
|
require "qiita/markdown/transformers/filter_iframe"
|
@@ -1784,6 +1784,43 @@ describe Qiita::Markdown::Processor do
|
|
1784
1784
|
end
|
1785
1785
|
end
|
1786
1786
|
|
1787
|
+
context "with HTML embed code for blueprintUE" do
|
1788
|
+
shared_examples "embed code blueprintUE example" do
|
1789
|
+
let(:markdown) do
|
1790
|
+
<<~MARKDOWN
|
1791
|
+
<iframe src="#{url}" width="800" height="600" frameborder="0" allowfullscreen="true"></iframe>
|
1792
|
+
MARKDOWN
|
1793
|
+
end
|
1794
|
+
let(:url) { "#{scheme}//blueprintue.com/embed/example" }
|
1795
|
+
|
1796
|
+
if allowed
|
1797
|
+
it "does not sanitize embed code" do
|
1798
|
+
should eq <<~HTML
|
1799
|
+
<iframe src="#{url}" width="800" height="600" frameborder="0" allowfullscreen="true"></iframe>
|
1800
|
+
HTML
|
1801
|
+
end
|
1802
|
+
else
|
1803
|
+
it "forces width attribute on iframe" do
|
1804
|
+
should eq <<~HTML
|
1805
|
+
<iframe src="#{url}" width="100%" height="600" frameborder="0" allowfullscreen="true"></iframe>
|
1806
|
+
HTML
|
1807
|
+
end
|
1808
|
+
end
|
1809
|
+
end
|
1810
|
+
|
1811
|
+
context "with scheme" do
|
1812
|
+
let(:scheme) { "https:" }
|
1813
|
+
|
1814
|
+
include_examples "embed code blueprintUE example"
|
1815
|
+
end
|
1816
|
+
|
1817
|
+
context "without scheme" do
|
1818
|
+
let(:scheme) { "" }
|
1819
|
+
|
1820
|
+
include_examples "embed code blueprintUE example"
|
1821
|
+
end
|
1822
|
+
end
|
1823
|
+
|
1787
1824
|
context "with embed code for Tweet" do
|
1788
1825
|
let(:markdown) do
|
1789
1826
|
<<-MARKDOWN.strip_heredoc
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qiita-markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
@@ -144,6 +144,7 @@ files:
|
|
144
144
|
- lib/qiita/markdown.rb
|
145
145
|
- lib/qiita/markdown/base_processor.rb
|
146
146
|
- lib/qiita/markdown/embed/asciinema.rb
|
147
|
+
- lib/qiita/markdown/embed/blueprint_ue.rb
|
147
148
|
- lib/qiita/markdown/embed/code_pen.rb
|
148
149
|
- lib/qiita/markdown/embed/docswell.rb
|
149
150
|
- lib/qiita/markdown/embed/figma.rb
|