Krzysztof Kowalczyk
373bb10556
more doc tweaking
2018-01-28 18:38:27 -08:00
Krzysztof Kowalczyk
72e64b068a
rewrite ToHTML() using Parse()
2018-01-28 13:21:53 -08:00
Krzysztof Kowalczyk
6465b74c87
tweak comment
2018-01-28 13:14:02 -08:00
Krzysztof Kowalczyk
5041dfee1f
add helper function markdown.Parse()
2018-01-28 13:13:03 -08:00
Krzysztof Kowalczyk
242d66580e
complete refactor
2018-01-28 00:50:21 -08:00
Krzysztof Kowalczyk
84fa04bf9d
less boilerplate
2018-01-27 20:51:43 -08:00
Krzysztof Kowalczyk
67ef9467b9
update docs
2018-01-27 20:44:39 -08:00
Krzysztof Kowalczyk
9e163b32d3
update docs
2018-01-27 19:45:55 -08:00
Krzysztof Kowalczyk
dfa474f00a
move parser into its own package
2018-01-27 18:50:27 -08:00
Krzysztof Kowalczyk
8641ad4e76
rename html.HTMLFlags => html.Flags
2018-01-27 18:39:03 -08:00
Krzysztof Kowalczyk
f15e5d05a9
rename HTMLRenderer => Renderer
2018-01-27 18:33:03 -08:00
Krzysztof Kowalczyk
956d0f875c
rename htmlrenderer.HTMLRendererParameters => htmlrenderer.Options
2018-01-27 18:29:51 -08:00
Krzysztof Kowalczyk
7b88bd6d02
move html renderer to htmlrenderer package
2018-01-27 18:22:11 -08:00
Krzysztof Kowalczyk
9577e74509
move Node to ast sub-package
2018-01-27 18:00:30 -08:00
Krzysztof Kowalczyk
da9aa552d2
tweak comments; reduce comment boilerplate
2018-01-26 14:21:26 -08:00
Krzysztof Kowalczyk
ce3ef7474d
move some code to parser.go
2018-01-26 01:42:23 -08:00
Krzysztof Kowalczyk
892d084af3
rework the api a bit
2018-01-26 00:11:58 -08:00
Krzysztof Kowalczyk
16f2860a87
remove Parser.ParsedAst
2018-01-25 23:22:37 -08:00
Krzysztof Kowalczyk
8bb670d63d
rename Markdown to Parser
2018-01-25 23:16:34 -08:00
Krzysztof Kowalczyk
26da860b55
switch to using interface{} for node data
2018-01-25 22:44:27 -08:00
Krzysztof Kowalczyk
904c88f346
tweak comments; add todo.md
2018-01-25 15:08:57 -08:00
Krzysztof Kowalczyk
f5c4e6b8da
tweak comments
2018-01-25 13:15:22 -08:00
Krzysztof Kowalczyk
78bcb2da26
update links
2018-01-25 13:06:17 -08:00
Krzysztof Kowalczyk
7557d13318
change package name
2018-01-25 13:01:19 -08:00
Vytautas Šaltenis
19913a1b76
Address feedback
2017-07-30 19:50:50 +03:00
Vytautas Šaltenis
d5487615af
Several small documentation fixes
2017-07-29 11:59:03 +03:00
Vytautas Šaltenis
479920a987
Improve the Renderer interface
...
Improve Renderer to be less confusing. Fix documentation for it.
OmitContents flag got dropped along the way. First, it would fit poorly
into the new design and second, it's unclear how widely this feature is
used. But most importantly, it's trivial to roll your own with the v2
API: https://gist.github.com/rtfb/2693f6bfcc1760661e8d2fb832763a15
Fixes #368 .
2017-07-09 15:44:00 +03:00
Pierre Neidhardt
2501229ba6
Rename Markdown()->Run() and Processor->Markdown
2017-06-05 21:42:05 +01:00
Pierre Neidhardt
a47518da29
[SQUASH] Doc update
2017-06-01 17:43:27 +01:00
Pierre Neidhardt
3cc9341a19
Merge Parser into Processor
2017-05-29 10:52:11 +02:00
Vytautas Šaltenis
a8c45a7349
Merge branch 'v2' into v2-functional-opts
2017-02-14 21:51:06 +02:00
Vytautas Šaltenis
5ebfae50aa
Merge pull request #331 from russross/v2-fix-180-again
...
Fix #180 again
2017-02-14 21:40:27 +02:00
Vytautas Šaltenis
747587a52d
Fix all headings wrongly referred to as headers
...
I've left test cases alone since can't lean on the compiler for
crosschecking there.
Fixes #330 .
2017-02-12 19:05:30 +02:00
Vytautas Šaltenis
7500a7e2ed
Fix #180 again
...
The check was introduced with d28de22
, when fixing #172 and #173 .
Then I removed it with bcd6dd8
when fixing #180
And then it was reintroduced with 232d06c
when fixing regression.
It seems that the check can be removed again. All these cases now have
tests (including the one from 69f51af
, which seems to have landed to v1
only, copying it here) and they all pass.
2017-02-12 17:57:51 +02:00
Vytautas Šaltenis
5e1065fa45
Fix blooper: remove dead code
2017-02-02 17:24:53 +02:00
Vytautas Šaltenis
e81d1d1138
Change the public interface to use functional options
...
Convert the most important Blackfriday's function, Markdown(), to accept
functional options (as per this Dave Cheney's post:
https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis )
2017-02-02 16:57:25 +02:00
Vytautas Šaltenis
d04a53c644
Merge branch 'v2' into v2-perf-tweaks
2017-02-02 12:00:48 +02:00
Vytautas Šaltenis
9c4ef640b9
Move TOC and OmitContents to HTML flags
...
The root problem this commit fixes is the duplication of Extensions
field in HTMLRendererParameters. The duplication crept in there only to
support these two flags, so moving the flags solves the problem. They're
only used in renderer anyway.
Fixes #277 .
2016-11-24 21:48:48 +02:00
Vytautas Šaltenis
120bb2fae1
Get rid of the preprocess stage
...
Yay!!
2016-11-10 21:49:58 +02:00
Pierre Neidhardt
627dc87cad
Add missing type to TableAlignment* constants
2016-10-09 08:43:40 +05:30
Vytautas Šaltenis
6141d5fde1
Merge pull request #306 from russross/v2-add-links-to-footnotes
...
V2 add links to footnotes
2016-10-03 08:14:53 +03:00
Vytautas Šaltenis
8a11177489
Add direct link to a footnote from it's referer
...
Some renderers might not care to have an explicit list of footnotes at
the end of the document, instead they're interested in the content of
the footnote at the location of a referer. Make their lives easier by
providing such a link
2016-09-17 19:35:42 +03:00
Pierre Neidhardt
4688db5f6f
Remove the LaTeX renderer stub and point to Ambrevar's implementation
2016-09-10 16:17:05 +05:30
Vytautas Šaltenis
b91b5719eb
Merge pull request #302 from russross/v2-move-footnotest-to-html
...
v2: move footnotes to html
2016-09-10 11:32:03 +03:00
Vytautas Šaltenis
91753e8bc7
v2: Extract package level documentation to doc.go ( #303 )
...
* Extract package level documentation to doc.go
Plus elaborate the documentation a bit.
* Fix grammar
2016-09-05 10:25:10 +03:00
Vytautas Šaltenis
d36199c417
Rename firstPass -> preprocess
2016-09-03 15:32:37 +03:00
Vytautas Šaltenis
3c2cb1ff45
Fix typo
2016-09-03 15:29:28 +03:00
Vytautas Šaltenis
43ba539936
Add some documentation to reference struct
2016-09-03 13:16:41 +03:00
Vytautas Šaltenis
6947216efb
Move footnote rendering to the renderer
...
Clean up footnotes part of an AST: don't force HTML-specific pieces
there, just keep a clean list of footnotes. Since some renderers might
want to process footnotes differently, let them know about footnotes by
having a flag on that list.
2016-09-03 12:39:16 +03:00
Vytautas Šaltenis
ea8dfc4880
Move reference extraction to paragraph parser
...
Move reference and footnote extraction code from firstPass to a
paragraph block parser. This makes firstPass a little bit slimmer, ergo
closer to elimination.
2016-09-03 11:32:41 +03:00