617 Commits

Author SHA1 Message Date
Krzysztof Kowalczyk
a4aec50a58 remove UseXHTML from default html flags 2018-01-26 00:20:45 -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
a6d62294de speed up go test; move the permutation-based crash test to a separate tool and speed it up by doing concurrency better 2018-01-25 16:19:07 -08:00
Krzysztof Kowalczyk
904c88f346 tweak comments; add todo.md 2018-01-25 15:08:57 -08:00
Krzysztof Kowalczyk
2366615cad split file benchmarks into separate functions to get better granurality of benchmarking 2018-01-25 14:41:50 -08:00
Krzysztof Kowalczyk
3ad26698c5 parallelize tests to go from 16 secs => 10 secs for 'go test' 2018-01-25 13:54:50 -08:00
Krzysztof Kowalczyk
f5c4e6b8da tweak comments 2018-01-25 13:15:22 -08:00
Krzysztof Kowalczyk
49a9386a12 make it stand-alone by folding https://github.com/shurcooL/sanitized_anchor_name 2018-01-25 13:09:33 -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
Krzysztof Kowalczyk
61abcf1b81 Merge branch 'master' into v2 2018-01-25 12:56:54 -08:00
Vytautas Šaltenis
6d1ef893fc Merge pull request #354 from russross/readme-for-v2
Document V2 in master README
2017-10-11 21:22:19 +03:00
Vytautas Šaltenis
8249792ba8 Update on import paths and dep transitive import FAQ
Update usage and import paths with and without package management.
Document the dep transitive dependency issue and how to get around it.
Couple more minor edits.
2017-10-07 12:41:58 +03:00
Vytautas Šaltenis
8ad7e40db0 Update README with the latest changes from v2 2017-10-07 11:14:28 +03:00
Vytautas Šaltenis
a03b7ee643 Add v1 import path, fix Bluemonday code snippet 2017-10-07 11:14:28 +03:00
Vytautas Šaltenis
52dd06192f Badges back to heading, reference v1 docs explicitly 2017-10-07 11:14:28 +03:00
Vytautas Šaltenis
ad4c953876 Put row of badges above the top level heading 2017-10-07 11:14:28 +03:00
Vytautas Šaltenis
74be510331 Document V2 in master README 2017-10-07 11:14:28 +03:00
Dmitri Shuralyov
187c33ff04 README: Update URL of LaTeX renderer. (#389)
It has moved from Bitbucket to GitHub.

Resolves #388.
2017-09-05 13:08:19 -04:00
Vytautas Šaltenis
cadec560ec Merge pull request #384 from bep/v2
Add Smartypants support for French Guillemets
2017-08-06 20:10:14 +03:00
Bjørn Erik Pedersen
3a1d515242 Add Smartypants support for French Guillemets
This is a port of the fix for #378 in v1.

Fixes #380
2017-08-02 21:42:14 +02:00
Vytautas Šaltenis
45820516bb Unexport a bunch of constants private to HTML renderer (#381)
Unexport a bunch of constants private to HTML renderer

They were cluttering the documentation and are not useful otherwise.
Rearrange constants in descending dependencies order
2017-08-02 09:20:10 +03:00
Vytautas Šaltenis
e0df702112 Merge pull request #382 from russross/v2-final-docs-fixes
Several small documentation fixes
2017-08-01 23:01:04 +03: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
4048872b16 Merge pull request #379 from bep/guillemets
Add Smartypants support for French Guillemets
2017-07-28 20:53:26 +03:00
Bjørn Erik Pedersen
4ca8c28b21 Add Smartypants support for French Guillemets
This commits adds flag `HTML_SMARTYPANTS_QUOTES_NBSP` which, when combined with `HTML_USE_SMARTYPANTS` will insert non-breaking spaces between the double quotes and the contained text.

This is mostly relevant for use in French  with `HTML_SMARTYPANTS_ANGLED_QUOTES`.

It should not hurt existing code path in the performance department:

```
name                     old time/op    new time/op    delta
SmartDoubleQuotes-4    2.58µs ± 1%    2.58µs ± 1%   ~             (p=1.000 n=5+5)

name                     old alloc/op   new alloc/op   delta
SmartDoubleQuotes-4    5.27kB ± 0%    5.27kB ± 0%   ~     (all samples are equal)

name                     old allocs/op  new allocs/op  delta
SmartDoubleQuotes-4      13.0 ± 0%      13.0 ± 0%   ~     (all samples are equal)
```

Fixes #378
2017-07-27 22:08:20 +02:00
Vytautas Šaltenis
f42ca5bf18 Merge pull request #377 from russross/v2-catch-up-readme
Catch up README with the latest changes in code
2017-07-26 21:43:53 +03:00
Vytautas Šaltenis
f86f06b532 Merge pull request #376 from russross/v2-improve-renderer-368
v2: improve Renderer and fix #368
2017-07-26 21:42:39 +03:00
Vytautas Šaltenis
427717f991 Use io.WriteString instead of w.Write([]byte(str)) 2017-07-10 19:11:30 +03:00
Vytautas Šaltenis
257ccba98f Catch up README with the latest changes in code 2017-07-09 16:27:38 +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
Vytautas Šaltenis
067529f716 Merge pull request #366 from choueric/master
fix duplicate and recursive footnotes. (#241)
2017-06-10 20:02:32 +03:00
choueric
5b2fb1b893 use map[string]struct{} as a set.
Use map[string]struct{} instead of map[string]bool to implement a set
and reduce memory space.
2017-06-10 22:24:27 +08:00
Vytautas Šaltenis
70c446a327 Merge pull request #365 from Ambrevar/v2
Merge Parser into Processor
2017-06-09 19:18:05 +03:00
choueric
8c89af6200 add 'notesRecord' to check footnote existence fast
It is necessary to use vector for 'notes' instead of map to keep
footnotes ordered. But checking for presence in a vector is not
efficient. So add a map variable 'notesRecord' to tackle this problem.
2017-06-09 10:20:58 +08:00
choueric
a20399916c fix duplicate and recursive footnotes. (#241)
Fix the infinite loop when there is a self-refer footnote by checking if
the reference is already added into parser.notes.

It also fixes of creating duplicate footnotes through this modification.

Add coresponding testcase.
2017-06-08 14:43:56 +08: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
Dmitri Shuralyov
0ba0f2b6ed Document SanitizedAnchorName algorithm, copy implementation. (#352)
The goal of this change is to reduce number of non-standard library
packages (repositories) that blackfriday imports from 1 to 0, and in
turn, reduce the cost of importing blackfriday into other projects.

Do so by documenting the algorithm of SanitizedAnchorName, and include
a copy of the small function inside blackfriday itself. The same
functionality continues to be available in the original location,
github.com/shurcooL/sanitized_anchor_name.Create. It can be used by
existing users and those that look for a small package, and don't need
all of blackfriday functionality. Existing users of blackfriday can use
the new SanitizedAnchorName function directly and avoid an extra
package import.

Resolves #350.
2017-05-09 02:07:14 -04:00
Vytautas Šaltenis
e7910a813f Merge pull request #327 from russross/readme-update
Update README for v2
2017-05-06 19:33:15 +03:00
Vytautas Šaltenis
af57319fac Merge pull request #328 from russross/v2-functional-opts
Change the public interface to use functional options
2017-05-06 19:31:47 +03:00
Vytautas Šaltenis
b253417e1c Merge pull request #334 from choueric/master
add an extension to handle Chinese (or CJK) newlines.
2017-04-13 20:36:32 +03:00
choueric
f0bb45f44c modify testcase of joinLine.
1. delete testdata 'zhJoinLines.txt'.
2. move the testcase from markdown_test.go into block_test.go.
2017-03-17 17:21:30 +08:00
choueric
8098dab4eb add testcase for joinLines extension 2017-02-22 09:18:21 +08:00
choueric
3ffe8c7f6b add extension to join lines 2017-02-22 09:15:46 +08:00