OrgMide parser in Javascript