Shortcode parser written in JavaScript