Hello,

medit...@gmail.com writes:

> In conclusion, do you have any tips on how to get syntax highlighting
> for ~...~ blocks?

You can use `org-export-filter-parse-tree' and replace all occurrences
of (code ...) into (inline-src-block ...) using a combination of
`org-element-map', and `org-element-set-element'.

Another option is indeed to create a new export back-end that replaces
code transcoder with a custom function, probably something ultimately
calling `org-html-inline-src-block', e.g.,

  (defun my-code-to-haskell (code contents info)
    (let ((haskell
           `(inline-src-block
             (:language "haskell" :value ,(org-element-property :value code)))))
      (org-html-inline-src-block haskell nil info)))

  (org-export-define-derived-backend 'haskell-html 'html
    :translate-alist '((code . my-code-to-haskell)))


Regards,

-- 
Nicolas Goaziou

Reply via email to