This commit is contained in:
Dawa Ometto
2019-08-29 14:10:54 +02:00
parent 2f2487150a
commit cc33d81473
2 changed files with 5 additions and 5 deletions
@@ -486,7 +486,7 @@ $(document).ready(function() {
// Set text direction auto
$('.markdown-body p, .markdown-body span, .markdown-body pre, .markdown-body table').attr('dir','auto');
// Copy anchors for each editable header and give it the new anchor the 'edit' class, to display a link to edit the section
// Copy anchors for each editable header and give the new anchor the 'edit' class, to display an "edit section" link
$('a.anchor').each(function (index, anchor) {
header = $(anchor).closest(':header');
if (header.hasClass('editable')){
+4 -4
View File
@@ -52,11 +52,11 @@ module Precious
Octicons::Octicon.new(symbol, parameters).to_svg
end
# Well-formed SVG with XMLNS and height/width removed, for use in CSS
def rocticon_css(symbol, parameters = {})
html = rocticon(symbol, parameters.merge({xmlns: 'http://www.w3.org/2000/svg'}))
html.gsub!(/\s*(width|height)=["']\d+["']\s*/, ' ') # remove height and width attributes so it can be set via CSS
html.gsub!(/\s+/, ' ')
html.force_encoding('UTF-8')
octicon = Octicons::Octicon.new(symbol, parameters.merge({xmlns: 'http://www.w3.org/2000/svg'}))
[:width, :height].each {|option| octicon.options.delete(option)}
octicon.to_svg
end
def octicon