Merge pull request #807 from jrblevin/issue-804
[markdown-mode.git] / scripts / get-recognized-gfm-languages.el
blob4d7c80d646b4032240cd0d91eaa0daaeaaa4b7d3
1 ;; -*- lexical-binding: t; -*-
3 (require 'cl-lib)
5 (let ((urlbuf
6 (url-retrieve-synchronously
7 "https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml"
8 t)))
9 (prog1 (with-current-buffer urlbuf
10 (goto-char (point-min))
11 ;; get past http headers
12 (re-search-forward "^$")
13 (cl-loop while (re-search-forward "^\\([^#[:space:]][^:]+\\):" nil t)
14 for lang = (match-string-no-properties 1)
15 collect (replace-regexp-in-string " " "-" lang)))
16 (kill-buffer urlbuf)))