first version of script to extract inline markup