Simplified jQuery logic for markdown related stuff.