Refactor space handling of writers
I went through the issues of goorgeous and picked a few that seemed easy enough to add (and added some fore as todos for later). That helped a lot and showed some bugs / edge cases that required changes. - the org writer wrote a lot of eol spaces and just removed it whenever String() was actually called. That worked until now but did not bode with rendering an empty headline - by removing ALL eol space we would render "* " back as just "*" -> not a headline anymore. - the html writer had some special handling for line spacing inside paragraphs and list items - with the introduction of more blocks we need that handling everywhere. As browsers / html renderers are nice enough to collapse whitespace (and especially collapse "\s*\n" into " ") we can just write out the newlines and let the renderer take care of the rest.
This commit is contained in:
parent
0df8bc541b
commit
592be07cfd
6 changed files with 339 additions and 98 deletions
19
README.org
19
README.org
|
@ -3,18 +3,23 @@ A basic org-mode parser in go
|
|||
- have a org-mode AST to play around with building an org-mode language server
|
||||
- hopefully add reasonable org-mode support to hugo - sadly [[https://github.com/chaseadamsio/goorgeous][goorgeous]] is broken & abandoned
|
||||
* next
|
||||
- handle #+RESULTS: raw and stuff
|
||||
- hugo frontmatter - see https://gohugo.io/content-management/front-matter/
|
||||
- captions: images, tables & blocks
|
||||
*** TODO [[https://github.com/chaseadamsio/goorgeous/issues/72][#72:]] Support for #+ATTR_HTML
|
||||
*** TODO [[https://github.com/chaseadamsio/goorgeous/issues/46][#46]]: Support for symbols like ndash and mdash
|
||||
- see org-entities replacement: see org-entities-help
|
||||
*** TODO [[https://github.com/chaseadamsio/goorgeous/issues/10][#10]]: Support noexport
|
||||
*** TODO [[https://github.com/chaseadamsio/goorgeous/issues/19][#19]]: Support #+HTML
|
||||
*** TODO [[https://github.com/chaseadamsio/goorgeous/issues/31][#31]]: Support #+INCLUDE
|
||||
- see https://orgmode.org/manual/Include-files.html
|
||||
*** TODO [[https://github.com/chaseadamsio/goorgeous/issues/33][#33]]: Wrong output when mixing html with org-mode
|
||||
* later
|
||||
- affiliated keywords
|
||||
see org-element.el - org-element-affiliated-keywords
|
||||
- affiliated keywords: see org-element.el - org-element-affiliated-keywords
|
||||
- keywords: support both multi (e.g. LINK, TODO) & normal (e.g. AUTHOR, TITLE) keywords
|
||||
- links based on #+LINK
|
||||
- includes https://orgmode.org/manual/Include-files.html
|
||||
could be used to have a single org file (ignored via hugo ignoreFiles) and then for each post a file including the relevant headline
|
||||
- tables
|
||||
colgroups https://orgmode.org/worg/org-tutorials/tables.html
|
||||
- org-entities replacement: see org-entities-help
|
||||
- table colgroups https://orgmode.org/worg/org-tutorials/tables.html
|
||||
- table pretty printing
|
||||
* resources
|
||||
- syntax
|
||||
- https://orgmode.org/worg/dev/org-syntax.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue