fixed bug in get_markup

get_markup was not extracting self closed(like <br/>). fixed it. modified test, added doc strings.