@@ -16222,22 +16222,22 @@ Opal.modules["components/shared/search_result_modal"] = function(Opal) {
16222
16222
16223
16223
/* Generated by Opal 0.10.5 */
16224
16224
Opal.modules["components/shared/md_converter"] = function(Opal) {
16225
- function $rb_plus(lhs, rhs) {
16226
- return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
16227
- }
16228
16225
function $rb_minus(lhs, rhs) {
16229
16226
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
16230
16227
}
16228
+ function $rb_plus(lhs, rhs) {
16229
+ return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
16230
+ }
16231
16231
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
16232
16232
16233
- Opal.add_stubs(['$gsub', '$process', '$lambda', '$on_heading', '$on_paragraph', '$on_code', '$on_codespan', '$on_blockquote', '$on_table', '$[]= ', '$highlight ', '$<< ', '$[] ', '$downcase ', '$+ ', '$- ']);
16233
+ Opal.add_stubs(['$gsub', '$process', '$lambda', '$on_heading', '$on_paragraph', '$on_code', '$on_codespan', '$on_blockquote', '$on_table', '$on_list ', '$<< ', '$[] ', '$-', '$[]= ', '$highlight ', '$downcase ', '$+ ']);
16234
16234
return (function($base, $super) {
16235
16235
function $MdConverter(){};
16236
16236
var self = $MdConverter = $klass($base, $super, 'MdConverter', $MdConverter);
16237
16237
16238
- var def = self.$$proto, $scope = self.$$scope, TMP_1, TMP_2, TMP_3, TMP_4, TMP_11, TMP_12, TMP_13, TMP_14, TMP_15, TMP_16, TMP_17, TMP_18;
16238
+ var def = self.$$proto, $scope = self.$$scope, TMP_1, TMP_2, TMP_3, TMP_4, TMP_12, TMP_13, TMP_14, TMP_15, TMP_16, TMP_17, TMP_18, TMP_19, TMP_20 ;
16239
16239
16240
- def.html = def.code_blocks = def.headings = def.md = def.sectionid = def.pageid = def.headings_index = def.sectionname = def.pagename = nil;
16240
+ def.html = def.code_blocks = def.headings = def.md = def.headings_index = def.sectionid = def.pageid = def.sectionname = def.pagename = nil;
16241
16241
Opal.defn(self, '$initialize', TMP_1 = function $$initialize(md, sectionname, sectionid, pageid, pagename) {
16242
16242
var self = this;
16243
16243
@@ -16271,8 +16271,8 @@ Opal.modules["components/shared/md_converter"] = function(Opal) {
16271
16271
return self.headings;
16272
16272
}, TMP_4.$$arity = 0);
16273
16273
16274
- Opal.defn(self, '$process', TMP_11 = function $$process() {
16275
- var $a, $b, TMP_5, $c, TMP_6, $d, TMP_7, $e, TMP_8, $f, TMP_9, $g, TMP_10, self = this;
16274
+ Opal.defn(self, '$process', TMP_12 = function $$process() {
16275
+ var $a, $b, TMP_5, $c, TMP_6, $d, TMP_7, $e, TMP_8, $f, TMP_9, $g, TMP_10, $h, TMP_11, self = this;
16276
16276
16277
16277
var renderer = new Marked.Renderer();
16278
16278
renderer.heading = ($a = ($b = self).$lambda, $a.$$p = (TMP_5 = function(text, level){var self = TMP_5.$$s || this;
@@ -16293,49 +16293,56 @@ if (quote == null) quote = nil;
16293
16293
renderer.table = ($a = ($g = self).$lambda, $a.$$p = (TMP_10 = function(header, body){var self = TMP_10.$$s || this;
16294
16294
if (header == null) header = nil;if (body == null) body = nil;
16295
16295
return self.$on_table(header, body)}, TMP_10.$$s = self, TMP_10.$$arity = 2, TMP_10), $a).call($g);
16296
+ renderer.list = ($a = ($h = self).$lambda, $a.$$p = (TMP_11 = function(body, ordered){var self = TMP_11.$$s || this;
16297
+ if (body == null) body = nil;if (ordered == null) ordered = nil;
16298
+ return self.$on_list(body, ordered)}, TMP_11.$$s = self, TMP_11.$$arity = 2, TMP_11), $a).call($h);
16296
16299
Marked.setOptions({ renderer: renderer });
16297
16300
return self.html = Marked(self.md);
16298
- }, TMP_11 .$$arity = 0);
16301
+ }, TMP_12 .$$arity = 0);
16299
16302
16300
- Opal.defn(self, '$on_table', TMP_12 = function $$on_table(header, body) {
16301
- var self = this;
16303
+ Opal.defn(self, '$on_table', TMP_13 = function $$on_table(header, body) {
16304
+ var self = this, return_html = nil ;
16302
16305
16303
- return "<table class='ui celled table'><thead class>" + (header) + "</thead><tbody class>" + (body) + "</tbody></table>";
16304
- }, TMP_12.$$arity = 2);
16306
+ return_html = "<table class='ui celled table'><thead class>" + (header) + "</thead><tbody class>" + (body) + "</tbody></table>";
16307
+ self.headings['$[]']($rb_minus(self.headings_index, 1))['$[]']("paragraphs")['$<<'](return_html);
16308
+ return return_html;
16309
+ }, TMP_13.$$arity = 2);
16305
16310
16306
- Opal.defn(self, '$on_code', TMP_13 = function $$on_code(code, lang) {
16307
- var self = this, cb = nil;
16311
+ Opal.defn(self, '$on_code', TMP_14 = function $$on_code(code, lang) {
16312
+ var self = this, cb = nil, return_html = nil ;
16308
16313
16309
16314
cb = $hash2([], {});
16310
16315
cb['$[]=']("html", self.$highlight(code, lang));
16311
16316
cb['$[]=']("code", code);
16312
16317
cb['$[]=']("lang", lang);
16313
16318
self.code_blocks['$<<'](cb);
16314
- return "<pre><code class='lang-" + (lang) + " hljs'>" + (cb['$[]']("html")) + "</code></pre>";
16315
- }, TMP_13.$$arity = 2);
16319
+ return_html = "<pre><code class='lang-" + (lang) + " hljs'>" + (cb['$[]']("html")) + "</code></pre>";
16320
+ self.headings['$[]']($rb_minus(self.headings_index, 1))['$[]']("paragraphs")['$<<'](return_html);
16321
+ return return_html;
16322
+ }, TMP_14.$$arity = 2);
16316
16323
16317
- Opal.defn(self, '$on_codespan', TMP_14 = function $$on_codespan(code) {
16324
+ Opal.defn(self, '$on_codespan', TMP_15 = function $$on_codespan(code) {
16318
16325
var self = this;
16319
16326
16320
16327
return "<code class='inline-codespan'>" + (code) + "</code>";
16321
- }, TMP_14 .$$arity = 1);
16328
+ }, TMP_15 .$$arity = 1);
16322
16329
16323
- Opal.defn(self, '$highlight', TMP_15 = function $$highlight(code, lang) {
16330
+ Opal.defn(self, '$highlight', TMP_16 = function $$highlight(code, lang) {
16324
16331
var self = this;
16325
16332
16326
16333
if (lang == null) {
16327
16334
lang = nil;
16328
16335
}
16329
16336
return hljs.highlightAuto(code).value;
16330
- }, TMP_15 .$$arity = -2);
16337
+ }, TMP_16 .$$arity = -2);
16331
16338
16332
- Opal.defn(self, '$on_blockquote', TMP_16 = function $$on_blockquote(quote) {
16339
+ Opal.defn(self, '$on_blockquote', TMP_17 = function $$on_blockquote(quote) {
16333
16340
var self = this;
16334
16341
16335
16342
return "<div class='ui cards'><div class='ui card fluid'><div class='content'>" + (quote) + "</div></div></div>";
16336
- }, TMP_16 .$$arity = 1);
16343
+ }, TMP_17 .$$arity = 1);
16337
16344
16338
- Opal.defn(self, '$on_heading', TMP_17 = function $$on_heading(text, level) {
16345
+ Opal.defn(self, '$on_heading', TMP_18 = function $$on_heading(text, level) {
16339
16346
var self = this, heading = nil;
16340
16347
16341
16348
heading = $hash2([], {});
@@ -16350,14 +16357,23 @@ if (header == null) header = nil;if (body == null) body = nil;
16350
16357
self.headings_index = $rb_plus(self.headings_index, 1);
16351
16358
self.headings['$<<'](heading);
16352
16359
return "<h" + (level) + " class='doc_h" + (level) + " chapteranchor' id='" + (heading['$[]']("slug")) + "'>" + (text) + "</h" + (level) + ">";
16353
- }, TMP_17 .$$arity = 2);
16360
+ }, TMP_18 .$$arity = 2);
16354
16361
16355
- return (Opal.defn(self, '$on_paragraph', TMP_18 = function $$on_paragraph(text) {
16356
- var self = this;
16362
+ Opal.defn(self, '$on_paragraph', TMP_19 = function $$on_paragraph(text) {
16363
+ var self = this, return_html = nil;
16364
+
16365
+ return_html = "<p>" + (text) + "</p>";
16366
+ self.headings['$[]']($rb_minus(self.headings_index, 1))['$[]']("paragraphs")['$<<'](return_html);
16367
+ return return_html;
16368
+ }, TMP_19.$$arity = 1);
16369
+
16370
+ return (Opal.defn(self, '$on_list', TMP_20 = function $$on_list(body, ordered) {
16371
+ var self = this, return_html = nil;
16357
16372
16358
- self.headings['$[]']($rb_minus(self.headings_index, 1))['$[]']("paragraphs")['$<<']("<p>" + (text) + "</p>");
16359
- return "<p>" + (text) + "</p>";
16360
- }, TMP_18.$$arity = 1), nil) && 'on_paragraph';
16373
+ return_html = "<ul>" + (body) + "</ul>";
16374
+ self.headings['$[]']($rb_minus(self.headings_index, 1))['$[]']("paragraphs")['$<<'](return_html);
16375
+ return return_html;
16376
+ }, TMP_20.$$arity = 2), nil) && 'on_list';
16361
16377
})($scope.base, null)
16362
16378
};
16363
16379
@@ -16746,7 +16762,7 @@ Opal.modules["components/shared/page_toc"] = function(Opal) {
16746
16762
16747
16763
($a = ($b = self).$before_mount, $a.$$p = (TMP_1 = function(){var self = TMP_1.$$s || this, $c;
16748
16764
16749
- if ((($c = $rb_lt($scope.get('NavigationStore').$accordionindex(), 0)) !== nil && $c != null && (!$c.$$is_boolean || $c == true))) {
16765
+ if ((($c = ( $rb_lt($scope.get('NavigationStore').$accordionindex(), 0) )) !== nil && $c != null && (!$c.$$is_boolean || $c == true))) {
16750
16766
return $scope.get('NavigationStore').$mutate().$accordionindex(-1)
16751
16767
} else {
16752
16768
return nil
@@ -17308,7 +17324,7 @@ Opal.modules["components/searchresult/search_result_body"] = function(Opal) {
17308
17324
var $a, $b, TMP_2, self = this, keywords = nil, matcher = nil, highlighted = nil;
17309
17325
17310
17326
keywords = search_string.$strip().$split(" ").$compact().$uniq();
17311
- matcher = $scope.get('Regexp').$new($rb_plus($rb_plus("(", keywords.$join("|")), ")"));
17327
+ matcher = $scope.get('Regexp').$new($rb_plus($rb_plus("\\b (", keywords.$join("|")), ")\\b "));
17312
17328
highlighted = ($a = ($b = text).$gsub, $a.$$p = (TMP_2 = function(match){var self = TMP_2.$$s || this;
17313
17329
if (match == null) match = nil;
17314
17330
return "<a class='ui teal label'>" + (match) + "</a>"}, TMP_2.$$s = self, TMP_2.$$arity = 1, TMP_2), $a).call($b, matcher);
@@ -17630,7 +17646,7 @@ Opal.modules["stores/section_store"] = function(Opal) {
17630
17646
}
17631
17647
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
17632
17648
17633
- Opal.add_stubs(['$state', '$load_and_convert_pages', '$current_page', '$mutate', '$[]', '$loaded', '$current_anchor', '$private', '$each', '$get', '$+', '$puts', '$ok?', '$new', '$body', '$[]=', '$headings', '$code_blocks', '$html', '$edit_url', '$build_lunr_page_searchindex', '$raw_url', '$-', '$==', '$each_with_index', '$gsub', '$join']);
17649
+ Opal.add_stubs(['$state', '$load_and_convert_pages', '$current_page', '$mutate', '$[]', '$loaded', '$current_anchor', '$private', '$each', '$get', '$+', '$puts', '$ok?', '$new', '$body', '$[]=', '$headings', '$code_blocks', '$html', '$edit_url', '$build_lunr_page_searchindex', '$raw_url', '$-', '$==', '$each_with_index', '$strip', '$ gsub', '$join']);
17634
17650
return (function($base, $super) {
17635
17651
function $SectionStore(){};
17636
17652
var self = $SectionStore = $klass($base, $super, 'SectionStore', $SectionStore);
@@ -17646,7 +17662,6 @@ Opal.modules["stores/section_store"] = function(Opal) {
17646
17662
self.sectionname = sectionname;
17647
17663
self.sectionid = sectionid;
17648
17664
self.pages = pages;
17649
- lunrsectionindex = [];
17650
17665
self.$load_and_convert_pages();
17651
17666
return self.$mutate().$current_page(self.pages['$[]'](0));
17652
17667
}, TMP_1.$$arity = 3);
@@ -17748,7 +17763,7 @@ if (heading == null) heading = nil;if (index == null) index = nil;
17748
17763
lunrheadingindex = {
17749
17764
"headingid": heading['$[]']("id"),
17750
17765
"headingname": heading['$[]']("text"),
17751
- "text": heading['$[]']("paragraphs").$join(" ").$gsub(/<\/?[^>]*>/, "")
17766
+ "text": heading['$[]']("paragraphs").$join(" ").$gsub(/<\/?[^>]*>/, "").$gsub(/\s+/, " ").$gsub(/'/, " ").$gsub(/::/, " :: ").$gsub(/[^a-zA-Z]+/, " ").$strip()
17752
17767
};
17753
17768
return lunrpageindex.push(lunrheadingindex);;}, TMP_14.$$s = self, TMP_14.$$arity = 2, TMP_14), $a).call($b);
17754
17769
lunrpageindex = lunrpageindex;
0 commit comments