From 968100499cabf0c3d27c8d2df6a08b957102ac30 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 29 Sep 2022 12:06:31 +1000 Subject: fixing source code in documentation --- hcel-utils.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hcel-utils.el b/hcel-utils.el index a35a441..df76f2a 100644 --- a/hcel-utils.el +++ b/hcel-utils.el @@ -151,7 +151,8 @@ Example of an idSrcSpan: (with-temp-buffer (insert html) (let ((shr-external-rendering-functions - '((span . hcel-tag-span)))) + '((span . hcel-tag-span) + (div . hcel-tag-div)))) (shr-render-region (point-min) (point-max))) (buffer-string)))) @@ -178,6 +179,11 @@ Example of an idSrcSpan: ))) (dom-attributes dom)))) +(defun hcel-tag-div (dom) + (if (equal (dom-attr dom 'class) "source-code") + (shr-tag-pre dom) + (shr-tag-div dom))) + (defun hcel-text-property-near-point (prop) "Find property prop at point, or just before point." (or (get-text-property (point) prop) -- cgit v1.2.3