teesloane / firn

Org Mode Static Site Generator
Eclipse Public License 1.0
324 stars 24 forks source link

Support org-entities (Special Symbols) #88

Open lyderichti59 opened 3 years ago

lyderichti59 commented 3 years ago

Hi,

I just filed an issue to Orgize about supporting org-entities (Special Symbols).

I can't use org special symbols with Firn for now especially non breaking spaces in my case. There is a workaround, which is to use HTML special symbols like  , but there are caveats like bad editor integration (compared to org-entities) and losing interop when exporting to other file formats.

Do you think of another way to handle this ?

Thanks

teesloane commented 3 years ago

I didn't even know about org-entities until today - good to know. It sounds like this is something the parser will have to handle - I would be hesitant to try and find a way to make this work in Firn. My intention with this project is to cover the largest / broadest features of Org -- and Orgize manages to capture most of them for now -- sorry for the inconvenience.

lyderichti59 commented 3 years ago

I think I could implement this. It seems we just need a map from org-entities to HTML equivalents, and replace keys by values in the generated HTML.

teesloane commented 3 years ago

I'd encourage you to try. It sound like the string replacement would need to run on every every text node, so it's worth considering if it would impact performance. I haven't done any performance testing yet, but we could check some basics before deciding whether to make this a default behaviour or to put it behind a config flag.