kaushalmodi / ox-hugo

A carefully crafted Org exporter back-end for Hugo
https://ox-hugo.scripter.co
GNU General Public License v3.0
882 stars 132 forks source link

Markdown rendered by ox-hugo converts inline html to entities #540

Closed jackbaty closed 2 years ago

jackbaty commented 2 years ago

Actual Behavior

When I use inline HTML in an org file and render it using ox-hugo, any inline HTML is converted to entities when generating Markdown

Expected Behavior

I would expect inline HTML to be rendered as-is.

How to Reproduce the Issue

Include HTML in a post and export it using ox-hugo (e.g. C-c C-e H H)

I do have the following set in config.toml...

[markup]
  [markup.goldmark]
    [markup.goldmark.renderer]
      unsafe = true

Although I'm not sure why that would matter, since it's the markdown coming from ox-hugo that is converting the HTML, not the final rendered content from Hugo. I'm not sure where to look.

Example Org File

https://github.com/jackbaty/baty.blog/blob/main/content-org/posts.org

Generated Markdown File or Error

https://github.com/jackbaty/baty.blog/blob/main/content/post/2022/2022-01-25-Tuesday.md

Ox-Hugo Debug Information

Debug Info # Debug information for `ox-hugo` ## Emacs Version GNU Emacs 27.2 (build 1, aarch64-apple-darwin21.2.0, Carbon Version 165 AppKit 2113.2) of 2021-12-17 ## Org Version Org mode version 9.6 (9.6-??-0c9b30e @ /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/) ## Hugo Version hugo v0.92.0+extended darwin/arm64 BuildDate=unknown ### Org `load-path` shadows **Warning**: Possible mixed installation of Org /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-exp hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-exp /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-emacs-lisp hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-emacs-lisp /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-css hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-css /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-lob hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-lob /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-irc hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-irc /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-forth hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-forth /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-macs hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-macs /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-version hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-version /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-scheme hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-scheme /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-C hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-C /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-capture hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-capture /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-ref hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-ref /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-clojure hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-clojure /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-mouse hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-mouse /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-ctags hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-ctags /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-entities hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-entities /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-archive hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-archive /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-screen hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-screen /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-bibtex hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-bibtex /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-haskell hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-haskell /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-table hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-table /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-eww hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-eww /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-org hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-org /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-num hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-num /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-plot hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-plot /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-rmail hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-rmail /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-awk hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-awk /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-groovy hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-groovy /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-octave hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-octave /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-faces hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-faces /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-colview hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-colview /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-R hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-R /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-refile hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-refile /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-timer hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-timer /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-mobile hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-mobile /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-fortran hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-fortran /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-shell hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-shell /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-perl hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-perl /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-sqlite hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-sqlite /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-sed hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-sed /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-list hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-list /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-ruby hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-ruby /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-eval hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-eval /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-habit hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-habit /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-clock hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-clock /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-goto hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-goto /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-html hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-html /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-src hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-src /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-lisp hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-lisp /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-eshell hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-eshell /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-ditaa hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-ditaa /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-pcomplete hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-pcomplete /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-lint hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-lint /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-latex hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-latex /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-sass hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-sass /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-tangle hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-tangle /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-calc hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-calc /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-java hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-java /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-icalendar hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-icalendar /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-mhe hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-mhe /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-attach-git hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-attach-git /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-md hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-md /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-beamer hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-beamer /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-element hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-element /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-protocol hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-protocol /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-gnuplot hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-gnuplot /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-tempo hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-tempo /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-latex hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-latex /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-w3m hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-w3m /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-id hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-id /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-man hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-man /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-feed hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-feed /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-lua hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-lua /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-table hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-table /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-ocaml hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-ocaml /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-gnus hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-gnus /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-indent hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-indent /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-lilypond hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-lilypond /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-matlab hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-matlab /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-datetree hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-datetree /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-docview hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-docview /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-python hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-python /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-makefile hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-makefile /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-duration hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-duration /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-agenda hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-agenda /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-dot hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-dot /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-js hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-js /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-publish hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-publish /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-inlinetask hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-inlinetask /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-org hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-org /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-keys hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-keys /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-core hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-core /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-compat hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-compat /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-odt hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-odt /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-info hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-info /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-plantuml hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-plantuml /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-eshell hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-eshell /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-ascii hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-ascii /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-loaddefs hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-loaddefs /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-maxima hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-maxima /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ol-bbdb hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ol-bbdb /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-macro hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-macro /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-sql hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-sql /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-attach hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-attach /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-processing hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-processing /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ox-texinfo hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ox-texinfo /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-crypt hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-crypt /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-footnote hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-footnote /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/org-install hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/org-install /Users/jbaty/.emacs.d/.local/straight/build-27.2/org/ob-comint hides /opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/share/emacs/27.2/lisp/org/ob-comint Study the output of `M-x list-load-path-shadows`. ## `ox-hugo` defcustoms
org-hugo-section “posts”
org-hugo-use-code-for-kbd nil
org-hugo-preserve-filling t
org-hugo-delete-trailing-ws t
org-hugo-prefer-hyphen-in-tags t
org-hugo-allow-spaces-in-tags t
org-hugo-tag-processing-functions (org-hugo–tag-processing-fn-replace-with-spaces-maybe org-hugo–tag-processing-fn-replace-with-hyphens-maybe)
org-hugo-auto-set-lastmod nil
org-hugo-export-with-toc nil
org-hugo-export-with-section-numbers nil
org-hugo-front-matter-format “toml”
org-hugo-default-static-subdirectory-for-externals “ox-hugo”
org-hugo-external-file-extensions-allowed-for-copying (“jpg” “jpeg” “tiff” “png” “svg” “gif” “mp4” “pdf” “odt” “doc” “ppt” “xls” “docx” “pptx” “xlsx”)
org-hugo-date-format “%Y-%m-%dT%T%z”
org-hugo-paired-shortcodes “”
org-hugo-suppress-lastmod-period 0.0
org-hugo-front-matter-format “toml”
kaushalmodi commented 2 years ago

Hello @jackbaty,

Although I'm not sure why that would matter, since it's the markdown coming from ox-hugo that is converting the HTML

You're right. This doesn't have to do with Hugo but with parsing of HTML characters in Org source when exporting to Markdown.

This was a recent breaking change that fixed an inconsistency in ox-hugo (compared to ox-html). If we want to export verbatim HTML, it needs to be in @@html:..@@ or in an HTML export block. You can see more details in https://github.com/kaushalmodi/ox-hugo/pull/476. The Org Macro example shown in that PR comment might help you.

I have a whitespace stripping feature in works which will help your use case too: https://github.com/kaushalmodi/ox-hugo/pull/538

kaushalmodi commented 2 years ago

Example:

#+macro: mark @@html:<mark>$1</mark>@@

Since I'm using Firefox on Linux, {{{mark(Timimi is the simplest option)}}} for saving TiddlyWiki files.
jackbaty commented 2 years ago

Thanks for the clarification. This should work just fine for me. I appreciate the example, also.

kaushalmodi commented 2 years ago

Thanks. Hopefully, this breakage wasn't too inconvenient.

I'll close this issue then.

kaushalmodi commented 2 years ago

@jackbaty If you update ox-hugo from the main branch (should land in Melpa in few hours), you can now do this:

Since I'm using Firefox on Linux, 
#+begin_mark
Timimi is the simplest option
#+end_mark
for saving TiddlyWiki files.

Reference: https://ox-hugo.scripter.co/doc/org-special-blocks/#whitespace-trimming