Find a file
Niklas Fasching c9d11e1556 Refactor OrgWriter and HTMLWriter: Remove cloning
Extension of the org & html writers is made possible by creating circular
references between the extending and extended writer - that way the extending
writer can forward all methods it doesn't implement to the extended writer and the
extended writer can use the extending writer as the root for method calls to
make sure methods overridden in the extending writer are used even for nested
method calls.

This circular reference leads to problems when cloning writers - cloning the
extended writer merely copies the pointer to the extending writer - i.e. the
extending writer does not get cloned with an updated reference to the extended
writer. Thus method calls to the extending writer act as if no cloning took
place and things break.

The easiest solution is to just get rid of cloning. We could also clone the
ExtendingWriter and replace it's reference to the extended writer with the just
cloned one but that's harder so we just remove it.

As there are a lot of "extending writer" and "extended writer" in the above
paragraphs and I'm too lazy to write up something better here's another attempt
at a TLDR:

Cloning is broken as ExtendingWriter is a reference to a writer that has
a reference to the writer we are cloning - that writer would have to have it's
reference updated but that's hard. So we solve it it by not cloning at all.
2019-11-02 23:33:34 +01:00
etc Update github pages demo for go 1.12+ 2019-06-03 17:01:38 +02:00
org Refactor OrgWriter and HTMLWriter: Remove cloning 2019-11-02 23:33:34 +01:00
.gitignore Set up fuzzing with go-fuzz 2018-12-20 00:30:58 +01:00
.travis.yml Add wasm demo to github pages 2018-12-16 19:54:17 +01:00
LICENSE Add MIT License 2018-12-20 20:30:14 +01:00
main.go Add some documentation & split Document into Configuration+Document 2019-01-02 19:17:17 +01:00
Makefile Add make preview & update README with basic development instructions 2019-09-22 02:02:32 +02:00
README.org Add support for latex fragments 2019-09-28 15:04:04 +02:00

go-org https://travis-ci.org/niklasfasching/go-org.svg?branch=master

An Org mode parser in go. Take a look at github pages for some examples and an online org -> html demo (wasm based). https://raw.githubusercontent.com/niklasfasching/go-org/master/etc/example.png Please note that the goal for the html export is to produce sensible html output, not to exactly reproduce output the output of org-html-export.

development

  1. make setup install
  2. change things
  3. make preview (regenerates fixtures & shows output in a browser)

in general, have a look at the Makefile - it's short enough.

not yet implemented

more types of links

see https://orgmode.org/manual/External-links.html & https://orgmode.org/manual/Internal-links.html