mirror of https://github.com/freeCodeCamp/devdocs
parent
12094c6757
commit
185302e3e7
@ -0,0 +1,17 @@
|
||||
module Docs
|
||||
class CraftCms
|
||||
class CleanHtmlV2Filter < Filter
|
||||
def call
|
||||
|
||||
# Add <a> for quick lookup
|
||||
css('header.h3 h3').each do |node|
|
||||
name = node.at_css('code').content.strip
|
||||
tag = name.tr('()', '') + '-detail'
|
||||
node.at_css('code').inner_html = "<a id=" + tag + ">" + name + "</a>"
|
||||
end
|
||||
|
||||
doc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in new issue