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