mirror of https://github.com/freeCodeCamp/devdocs
parent
6428cee512
commit
a1dba5d989
@ -0,0 +1,19 @@
|
|||||||
|
module Docs
|
||||||
|
class Phalcon
|
||||||
|
class CleanHtmlFilter < Filter
|
||||||
|
def call
|
||||||
|
@doc = at_css('.body')
|
||||||
|
|
||||||
|
# Remove unnecessary things
|
||||||
|
css('').remove
|
||||||
|
|
||||||
|
# Add id for constants and methods
|
||||||
|
css('#constants strong', '#methods strong').each do |node|
|
||||||
|
node.parent['id'] = node.content.strip
|
||||||
|
end
|
||||||
|
|
||||||
|
doc
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in new issue