lib/github/mandoc.rb
def replace_unwhitelisted_tags
				# Monospace + bold
				@doc.css(".Cd, .Cm, .Fd, .Fl, .Fn, .Ic, .In, code.Nm").each do |el|
					bold = @doc.create_element "b"
					code = @doc.create_element "code", el.inner_text
					bold.add_child code
					el.children= bold
				end

				# Plain monospace
				@doc.css(".Ad").wrap "<samp></samp>"
				@doc.css(".Pa, .Xr").wrap "<code></code>"
			end
# Replace elements that aren't included in GitHub's HTML whitelist
Replace elements that aren't included in GitHub's HTML whitelist
Replace elements that aren ' t included in GitHub ' s HTML whitelist
def replace_unwhitelisted_tags
				@doc.css(".Cd, .Cm, .Fd, .Fl, .Fn, .Ic, .In, code.Nm").each do |el|
					bold = @doc.create_element "b"
					code = @doc.create_element "code", el.inner_text
					bold.add_child code
					el.children= bold
				end
				@doc.css(".Ad").wrap "<samp></samp>"
				@doc.css(".Pa, .Xr").wrap "<code></code>"
			end
def replace_unwhitelisted_tags @doc . css ( ".Cd, .Cm, .Fd, .Fl, .Fn, .Ic, .In, code.Nm" ) . each do | el | bold = @doc . create_element "b" code = @doc . create_element "code" , el . inner_text bold . add_child code el . children = bold end @doc . css ( ".Ad" ) . wrap "<samp></samp>" @doc . css ( ".Pa, .Xr" ) . wrap "<code></code>" end
Replace elements that aren't included in GitHub's HTML whitelist
Replace elements that aren ' t included in GitHub ' s HTML whitelist
# Monospace + bold # Plain monospace