added get_markup method

this method is not much readable. i didn't found any other way to do it. alternate solution is to use HTMLParser and it adds a lot of code.

renamed code_percentage to percentage so  that both code and markup can use the method.
since func is returning only ratio not percentage, can we rename the function to something else?