Commit Graph

8 Commits

Author SHA1 Message Date
Vytautas Šaltenis edb8b769eb Fix Windows-style newlines, harder
This mainly adds a re-run of all reference tests with Unix newlines
replaced with Windows ones. Plus, fixes for a bazillion of problems that
this test uncovered.

Node now contains a ContainsWindowsNewlines field, which is set to true
when the contents of the node (either in .Literal or in .content)
include text having '\r' characters. This is then checked at render time
for replacement back to Unix newlines.
2018-08-11 23:07:06 +03:00
Pierre Neidhardt 2501229ba6 Rename Markdown()->Run() and Processor->Markdown 2017-06-05 21:42:05 +01: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 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
Pierre Neidhardt 02da1dfe9d Factor Smartypants to HTML
Smartypants is HTML-specific.
There is no need to run Smartypants from `Render()`.
This simplifies extensions built upon the HTML renderer.
2016-08-10 09:58:33 +05:30
Vytautas Šaltenis e054c962e7 More lint: markdown.go and ripples to other files 2016-07-27 21:28:41 +03:00
Dmitri Shuralyov 2560c5f148 Fix issue in fenced code block pre-processing.
Forwardport changes from #280.

Fixes #279.
2016-07-15 17:03:02 -04:00
Dmitri Shuralyov a41899bbac v2: Only include test helpers inside test package. 2016-07-01 11:47:39 -07:00