File tree Expand file tree Collapse file tree 2 files changed +12
-18
lines changed
Expand file tree Collapse file tree 2 files changed +12
-18
lines changed Original file line number Diff line number Diff line change 11module 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
2316end
Original file line number Diff line number Diff 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" ,
You can’t perform that action at this time.
0 commit comments