From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Berthier Subject: [PATCH] Fontify inline source blocks when exporting to HTML Date: Mon, 15 May 2017 16:35:52 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAI3i-0005xW-I4 for emacs-orgmode@gnu.org; Mon, 15 May 2017 11:37:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAI3e-0002s0-VD for emacs-orgmode@gnu.org; Mon, 15 May 2017 11:37:18 -0400 Received: from bhsophx.liv.ac.uk ([138.253.100.116]:52850) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dAI3e-0002rq-Np for emacs-orgmode@gnu.org; Mon, 15 May 2017 11:37:14 -0400 Received: from bhsophx.liv.ac.uk (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id F1CB9C0742 for ; Mon, 15 May 2017 16:37:10 +0100 (BST) Received: from bhmx1.liv.ac.uk (bhmx1.liv.ac.uk [138.253.100.155]) by bhsophx.liv.ac.uk (Postfix) with ESMTP id EA8EFC05D0 for ; Mon, 15 May 2017 16:37:10 +0100 (BST) Received: from chmhub1.liv.ac.uk ([138.253.100.140]) by bhmx1.liv.ac.uk with esmtp (Exim 4.80.1) (envelope-from ) id 1dAI3a-0004bB-U7 for emacs-orgmode@gnu.org; Mon, 15 May 2017 16:37:10 +0100 Received: from localhost ([127.0.0.1] helo=chmhub1.liv.ac.uk) by chmhub1.liv.ac.uk with esmtp (Exim 4.84_2) (envelope-from ) id 1dAI3a-000AWf-Ti for emacs-orgmode@gnu.org; Mon, 15 May 2017 16:37:10 +0100 Received: from [138.253.184.201] (helo=nberth.csc.liv.ac.uk) by chmhub1.liv.ac.uk with esmtps (TLSv1.2:AES256-SHA:256) (Exim 4.84_2) (envelope-from ) id 1dAI3a-000AWb-Ro for emacs-orgmode@gnu.org; Mon, 15 May 2017 16:37:10 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi! Inline source code blocks are not fontified by the HTML backend anymore (I have a document with such code blocks that exported fine two years ago, with Org 7 or 8 I think). If that's the intended behavior, then I would like to know the proper way to recover the old behavior; otherwise, let me suggest this small patch to remedy that issue. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fontify-inline-source-blocks-when-exporting-to-HTML.patch >From 4682af888ca3b86eb05c6d40169725cca17136e3 Mon Sep 17 00:00:00 2001 From: Nicolas Berthier Date: Mon, 15 May 2017 15:44:11 +0100 Subject: [PATCH] Fontify inline source blocks when exporting to HTML * lisp/ox-html.el (org-html-inline-src-block): Fontify inline source blocks. --- lisp/ox-html.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index fc91e96..fef79ca 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2685,7 +2685,8 @@ contextual information." (let ((lbl (and (org-element-property :name inline-src-block) (org-export-get-reference inline-src-block info)))) (if (not lbl) "" (format " id=\"%s\"" lbl))))) - (format "%s" lang label code))) + (format "%s" lang label + (org-html-fontify-code code lang)))) ;;;; Inlinetask -- 2.7.0.rc0.20.g4b9ab0e --=-=-= Content-Type: text/plain Best regards, -- Nicolas Berthier FSF Member #7975 --=-=-=--