-
-
Save arbelt/566df295de2e9c393bd0 to your computer and use it in GitHub Desktop.
This file contains 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
;; Usage Example: | |
;; | |
;; <!-- BEGIN RECEIVE ORGTBL ${1:YOUR_TABLE_NAME} --> | |
;; <!-- END RECEIVE ORGTBL $1 --> | |
;; | |
;; <!-- | |
;; #+ORGTBL: SEND $1 orgtbl-to-gfm | |
;; | $0 | | |
;; --> | |
(defun orgtbl-to-gfm (table params) | |
"Convert the Orgtbl mode TABLE to GitHub Flavored Markdown." | |
(let* ((alignment (mapconcat (lambda (x) (if x "|--:" "|---")) | |
org-table-last-alignment "")) | |
(params2 | |
(list | |
:splice t | |
:hline (concat alignment "|") | |
:lstart "| " :lend " |" :sep " | "))) | |
(orgtbl-to-generic table (org-combine-plists params2 params)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment