Skip to content

Commit 8e9d620

Browse files
update to internal commit 44fa8f80
1 parent 2ee62f4 commit 8e9d620

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

_plugins/custom_alerts.rb

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
module Jekyll
2-
class AlertsConverter < Converter
2+
Jekyll::Hooks.register [:pages, :posts], :post_render do |doc|
3+
next unless doc.output && !doc.output.nil?
4+
next unless doc.path.end_with?(".md")
5+
next unless doc.output.include?("[!")
36

4-
def matches(ext)
5-
ext =~ /^\.md|\.markdown$/i
6-
end
7-
8-
def output_ext(ext)
9-
".html"
10-
end
7+
doc.output.gsub!(/<blockquote>.*?\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\](.*?)<\/blockquote>/mi) do
8+
type = $1.downcase
9+
text = $2.strip
1110

12-
def convert(content)
13-
content.gsub(/^> \[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*(.*)/i) do
14-
type = $1.downcase
15-
text = $2.strip.gsub(/^>\s*/, "")
16-
<<~HTML
17-
<div class="blockquote-#{type}"></div>
18-
<blockquote>#{text}</blockquote>
19-
HTML
20-
end
11+
<<~HTML
12+
<blockquote class="blockquote-#{type}">#{text}</blockquote>
13+
HTML
2114
end
2215
end
2316
end

assets/js/docsLangLatestVersion.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ var docsLangLatestVersion = {
2727
},
2828
mrz: {
2929
android: "2.0.1",
30-
ios: "2.0.1"
30+
ios: "2.0.1",
31+
javascript: "2.0"
3132
},
3233
dce: {
3334
core: "4.2.10",

0 commit comments

Comments
 (0)