Created
          March 12, 2014 13:47 
        
      - 
      
- 
        Save wujiang/9507248 to your computer and use it in GitHub Desktop. 
    Surround option words with quotes
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ;; Surround option words with quotes | |
| ;; It's helpful for making javascript work with IE. | |
| ;; i.e.: | |
| ;; | |
| ;; title: { | |
| ;; text: "highcharts example" | |
| ;; }, | |
| ;; exporting: { | |
| ;; enabled: false | |
| ;; }, | |
| ;; | |
| ;; becomes | |
| ;; | |
| ;; "title": { | |
| ;; "text": "highcharts example" | |
| ;; }, | |
| ;; "exporting": { | |
| ;; "enabled": false | |
| ;; }, | |
| (while (re-search-forward "[a-zA-Z]+:" nil t) | |
| (goto-char (match-beginning 0)) | |
| (insert "\"") | |
| (goto-char (match-end 0)) | |
| (insert "\"")) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment