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

Back-converting of underscore does not work for some emoji #405

Closed Rindrics closed 3 years ago

Rindrics commented 3 years ago

Thank you for developing great tool!!!

Recently I faced confusing behavior that back-converting of underscore does not work for some emoji.

Would you give me some advise to fix this?

Thank you.

Actual Behavior

:raised_hands:
:white\_check\_mark: 
🙌 
:white_check_mark:

Expected Behavior

:raised_hands:
:white_check_mark:
🙌 
✅ 

How to Reproduce the Issue

Example Org File

:raised_hands:
:white_check_mark:

Generated Markdown File or Error

Ox-Hugo Debug Information

Debug Info # Debug information for `ox-hugo` ## Emacs Version GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2020-08-12 ## Org Version Org mode version 9.3.7 (9.3.7-12-g5d6868-elpa @ /Users/ahayashi/.emacs.d/elpa/org-20200706/) ## Hugo Version Hugo Static Site Generator v0.76.5/extended darwin/amd64 BuildDate: unknown ### Org `load-path` shadows **Warning**: Possible mixed installation of Org /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-stan hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-stan /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-exp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-exp /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-J hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-J /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-emacs-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-emacs-lisp /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-css hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-css /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-lob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lob /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-irc hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-irc /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-forth hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-forth /Users/ahayashi/.emacs.d/elpa/org-20200706/org-macs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macs /Users/ahayashi/.emacs.d/elpa/org-20200706/ob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob /Users/ahayashi/.emacs.d/elpa/org-20200706/org-version hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-version /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-scheme hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-scheme /Users/ahayashi/.emacs.d/elpa/org-20200706/ox hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-abc hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-abc /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-C hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-C /Users/ahayashi/.emacs.d/elpa/org-20200706/org-capture hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-capture /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-ref hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ref /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-clojure hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-clojure /Users/ahayashi/.emacs.d/elpa/org-20200706/org-mouse hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mouse /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-ledger hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ledger /Users/ahayashi/.emacs.d/elpa/org-20200706/org-ctags hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-ctags /Users/ahayashi/.emacs.d/elpa/org-20200706/org-entities hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-entities /Users/ahayashi/.emacs.d/elpa/org-20200706/org-archive hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-archive /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-screen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-screen /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-bibtex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-bibtex /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-haskell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-haskell /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-asymptote hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-asymptote /Users/ahayashi/.emacs.d/elpa/org-20200706/org-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-table /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-eww hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-eww /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-org /Users/ahayashi/.emacs.d/elpa/org-20200706/org-num hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-num /Users/ahayashi/.emacs.d/elpa/org-20200706/org-plot hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-plot /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-rmail hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-rmail /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-awk hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-awk /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-groovy hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-groovy /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-octave hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-octave /Users/ahayashi/.emacs.d/elpa/org-20200706/org-faces hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-faces /Users/ahayashi/.emacs.d/elpa/org-20200706/org-colview hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-colview /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-R hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-R /Users/ahayashi/.emacs.d/elpa/org-20200706/org-timer hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-timer /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-ebnf hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ebnf /Users/ahayashi/.emacs.d/elpa/org-20200706/org-mobile hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mobile /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-fortran hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-fortran /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-shell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-shell /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-perl hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-perl /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-sqlite hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sqlite /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-sed hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sed /Users/ahayashi/.emacs.d/elpa/org-20200706/org-list hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-list /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-ruby hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ruby /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-eval hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eval /Users/ahayashi/.emacs.d/elpa/org-20200706/org-habit hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-habit /Users/ahayashi/.emacs.d/elpa/org-20200706/org-clock hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-clock /Users/ahayashi/.emacs.d/elpa/org-20200706/org-goto hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-goto /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-html hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-html /Users/ahayashi/.emacs.d/elpa/org-20200706/org-src hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-src /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lisp /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-eshell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-eshell /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-ditaa hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ditaa /Users/ahayashi/.emacs.d/elpa/org-20200706/org-pcomplete hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-pcomplete /Users/ahayashi/.emacs.d/elpa/org-20200706/org-lint hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-lint /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-latex /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-sass hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sass /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-io hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-io /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-tangle hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-tangle /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-calc hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-calc /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-java hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-java /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-icalendar hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-icalendar /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-mhe hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-mhe /Users/ahayashi/.emacs.d/elpa/org-20200706/org-attach-git hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach-git /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-md hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-md /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-beamer hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-beamer /Users/ahayashi/.emacs.d/elpa/org-20200706/org-element hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-element /Users/ahayashi/.emacs.d/elpa/org-20200706/org-protocol hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-protocol /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-mscgen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-mscgen /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-gnuplot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-gnuplot /Users/ahayashi/.emacs.d/elpa/org-20200706/org-tempo hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-tempo /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-latex /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-w3m hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-w3m /Users/ahayashi/.emacs.d/elpa/org-20200706/org-id hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-id /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-vala hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-vala /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-man hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-man /Users/ahayashi/.emacs.d/elpa/org-20200706/org-feed hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-feed /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-lua hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lua /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-table /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-ocaml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ocaml /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-coq hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-coq /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-gnus hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-gnus /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-picolisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-picolisp /Users/ahayashi/.emacs.d/elpa/org-20200706/org-indent hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-indent /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-lilypond hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lilypond /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-matlab hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-matlab /Users/ahayashi/.emacs.d/elpa/org-20200706/org-datetree hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-datetree /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-docview hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-docview /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-python hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-python /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-makefile hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-makefile /Users/ahayashi/.emacs.d/elpa/org-20200706/org-duration hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-duration /Users/ahayashi/.emacs.d/elpa/org-20200706/org-agenda hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-agenda /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-dot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-dot /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-js hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-js /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-publish hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-publish /Users/ahayashi/.emacs.d/elpa/org-20200706/org-inlinetask hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-inlinetask /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-org /Users/ahayashi/.emacs.d/elpa/org-20200706/org-keys hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-keys /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-core hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-core /Users/ahayashi/.emacs.d/elpa/org-20200706/org-compat hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-compat /Users/ahayashi/.emacs.d/elpa/org-20200706/ol hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-odt hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-odt /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-info hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-info /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-plantuml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-plantuml /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-eshell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eshell /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-ascii hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-ascii /Users/ahayashi/.emacs.d/elpa/org-20200706/org-loaddefs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-loaddefs /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-hledger hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-hledger /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-maxima hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-maxima /Users/ahayashi/.emacs.d/elpa/org-20200706/org hides /Applications/Emacs.app/Contents/Resources/lisp/org/org /Users/ahayashi/.emacs.d/elpa/org-20200706/ol-bbdb hides /Applications/Emacs.app/Contents/Resources/lisp/org/ol-bbdb /Users/ahayashi/.emacs.d/elpa/org-20200706/org-macro hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macro /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-sql hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sql /Users/ahayashi/.emacs.d/elpa/org-20200706/org-attach hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-processing hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-processing /Users/ahayashi/.emacs.d/elpa/org-20200706/ox-texinfo hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-texinfo /Users/ahayashi/.emacs.d/elpa/org-20200706/org-crypt hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-crypt /Users/ahayashi/.emacs.d/elpa/org-20200706/org-footnote hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-footnote /Users/ahayashi/.emacs.d/elpa/org-20200706/org-install hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-install /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-comint hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-comint /Users/ahayashi/.emacs.d/elpa/org-20200706/ob-shen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-shen 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-langs-no-descr-in-code-fences nil
org-hugo-suppress-lastmod-period 0.0
org-hugo-front-matter-format "toml"
kaushalmodi commented 3 years ago

Note to self: This needs a fix similar to https://github.com/kaushalmodi/ox-hugo/commit/ad48e6e0cf43e5ec6ba431cbb5daf6200a1abb69 that fixed https://github.com/kaushalmodi/ox-hugo/issues/417.