voloko-sdoc 0.2.10 → 0.2.10.1
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.
@@ -407,8 +407,7 @@ Searchdoc.Panel.prototype = $.extend({}, Searchdoc.Navigation, new function() {
|
|
407
407
|
html += '</h1>';
|
408
408
|
html += '<p>';
|
409
409
|
if (typeof badge != 'undefined') {
|
410
|
-
|
411
|
-
html += '<span class="badge badge_' + (badge + 1) + '">' + escapeHTML(this.data.badges[badge] || 'unknown') + '</span>';
|
410
|
+
html += '<span class="badge badge_' + (badge % 6 + 1) + '">' + escapeHTML(this.data.badges[badge] || 'unknown') + '</span>';
|
412
411
|
}
|
413
412
|
html += hlt(result.namespace) + '</p>';
|
414
413
|
if (result.snippet) html += '<p class="snippet">' + escapeHTML(result.snippet) + '</p>';
|
@@ -407,8 +407,7 @@ Searchdoc.Panel.prototype = $.extend({}, Searchdoc.Navigation, new function() {
|
|
407
407
|
html += '</h1>';
|
408
408
|
html += '<p>';
|
409
409
|
if (typeof badge != 'undefined') {
|
410
|
-
|
411
|
-
html += '<span class="badge badge_' + (badge + 1) + '">' + escapeHTML(this.data.badges[badge] || 'unknown') + '</span>';
|
410
|
+
html += '<span class="badge badge_' + (badge % 6 + 1) + '">' + escapeHTML(this.data.badges[badge] || 'unknown') + '</span>';
|
412
411
|
}
|
413
412
|
html += hlt(result.namespace) + '</p>';
|
414
413
|
if (result.snippet) html += '<p class="snippet">' + escapeHTML(result.snippet) + '</p>';
|
data/lib/sdoc/templatable.rb
CHANGED
@@ -34,7 +34,16 @@ module SDoc::Templatable
|
|
34
34
|
output = eval_template(templatefile, context)
|
35
35
|
|
36
36
|
# TODO delete this dirty hack when documentation for example for GeneratorMethods will not be cutted off by <script> tag
|
37
|
-
|
37
|
+
begin
|
38
|
+
if output.respond_to? :force_encoding
|
39
|
+
encoding = output.encoding
|
40
|
+
output = output.force_encoding('ASCII-8BIT').gsub('<script>', '<script;>').force_encoding(encoding)
|
41
|
+
else
|
42
|
+
output = output.gsub('<script>', '<script>')
|
43
|
+
end
|
44
|
+
rescue Exception => e
|
45
|
+
|
46
|
+
end
|
38
47
|
|
39
48
|
unless $dryrun
|
40
49
|
outfile.dirname.mkpath
|