Hello, I found [this] discussion while trying to strip `org` format markers from the `title` tag during `HTML` export. Is there still interest in this idea? If so, I can submit a patch.
[this] <https://list.orgmode.org/CAHa53uwvvXARYX_Guy_-aMWYoTv=na3dszaphfenafhv9yw...@mail.gmail.com/> On 2021-04-22 13:34, Tim Visher wrote: > On Thu, Apr 22, 2021 at 11:36 AM Nicolas Goaziou <m...@nicolasgoaziou.fr > <mailto:m...@nicolasgoaziou.fr>> wrote: > > Tim Visher <tim.vis...@gmail.com <mailto:tim.vis...@gmail.com>> writes: > > > Thanks for the tip. What I'm thinking more is somehow getting the > heading > > pre-output generation, stripping any characters that `org` would > consider > > special (I'm hoping there's already a function that can at least mark > > 'markup' text in a given org string), and _then_ passing it to whatever > ox > > function is responsible for using the title. That way it's as generic > as it > > can possibly be. > > In `org-html--build-meta-info' from "ox-html.el", replace the following > > (org-html-plain-text > (org-element-interpret-data (plist-get info :title)) info) > > with > > (org-export-data-with-backend (plist-get info :title) > (org-export-create-backend > :transcoders > '((bold . (lambda (_ c _) c)) > (italic . (lambda (_ c _) c)))) > info) > > Now re-evaluate the function `org-html--build-meta-info' and try > exporting a document to HTML with a title containing bold and italic > syntax, even nested, e.g. > > #+title: /Some *bold* text/ > > Adding the function `org-export-strip-syntax below to "ox.el" > > (defun org-export-strip-syntax (data info) > (org-export-data-with-backend data > (org-export-create-backend > :transcoders > '((bold . (lambda (_ c _) c)) > (italic . (lambda (_ c _) c)))) > info)) > > you can now call it from any export back-end whenever its needs to > remove syntax from a piece of code. > > You can also drop the info argument and add it to "org-element.el". But > it depends on what you want to obtain. Also, some syntax is not obvious > to strip, as I suggested in my previous message. > > Awesome! This is a ton of great info. If I decide to bite this off I'll be > sure to reference this. :) Thanks, -- Jacob S. Gordon jacob.as.gor...@gmail.com ====================== Please avoid sending me HTML emails and MS Office documents. https://useplaintext.email/#etiquette https://www.gnu.org/philosophy/no-word-attachments.html