1
0
mirror of https://github.com/danog/blackfriday.git synced 2024-11-26 12:04:46 +01:00
Commit Graph

589 Commits

Author SHA1 Message Date
46f3fff6e1
Switch to chroma 2022-01-06 20:42:55 +01:00
2c98907303 Update namespace 2022-01-06 18:49:55 +01:00
7a9993e054
Final fixes 2022-01-06 18:21:16 +01:00
e99e04f09b
Invoke pygmentize 2022-01-06 17:53:33 +01:00
ba29d94709
Add syntax highlighting 2022-01-06 17:42:05 +01:00
Dmitri Shuralyov
4c9bf95126
v2/README: make a definitive decision on v2 import path
This change makes it clear that the v2 import path
is github.com/russross/blackfriday/v2, and updates
various links accordingly.

See https://github.com/russross/blackfriday/issues/587#issuecomment-703393820 for details.

This change also converges the README for v1 and v2
to be consistent, as they've started to drift apart.

For #587.

GitHub-Pull-Request: #675
2020-10-26 23:47:54 -04:00
Russ Ross
acedacffef
Merge pull request #468 from ruqqq/v2
Fix html renderer escaping valid entities
2020-07-14 10:41:29 -06:00
Russ Ross
3b2b20c8cb
Merge pull request #547 from adiabatic/v2
Use ↩ as default params.FootnoteReturnLinkContents
2020-02-18 16:52:18 -07:00
Russ Ross
a1ae674f6f
Merge pull request #571 from bkmgit/v2
add tests for ftp links
2020-02-18 16:46:30 -07:00
Benson Muite
df341a4ed8
Update Markdown Documentation - Basics.text
Fix error in updating file
2019-10-13 12:44:14 +03:00
Benson Muite
5ba3beb8b0
Update Markdown Documentation - Basics.html
fix error in updating file
2019-10-13 12:40:23 +03:00
Benson Muite
63f131c239
Update Markdown Documentation - Basics.html
Add ftp test
2019-10-13 12:36:35 +03:00
Benson Muite
a178dd93fe
Update Markdown Documentation - Basics.text
Add ftp link to test other protocols
2019-10-13 12:35:38 +03:00
Russ Ross
3e56bb68c8
Merge pull request #540 from twpayne/export-is-container
Export Node.IsContainer and add Node.IsLeaf
2019-06-29 09:15:18 -06:00
Nathan Galt
412ca19665 Use ↩ as default params.FootnoteReturnLinkContents
This changes the default `params.FootnoteReturnLinkContents` from `<sup>[return]</sup>` to `↩\ufe0e`.

It’s very common to use `↩` in footnote links. However, some platforms like iOS and iPadOS choose to use emoji presentation for this particular character. This leads to lots of blogs, by default, looking silly on portable Apple gizmos, as described in <https://github.com/jgm/pandoc/issues/5469>. By switching to a return arrow with a disable-emojification variation selector, we get blackfriday to do the right thing by default.

Additionally, ↩ is more language-agnostic than “return” is, so blackfriday will work better out of the box for more people.
2019-06-10 16:05:36 -07:00
Tom Payne
d96905437e Add Node.IsLeaf 2019-04-23 22:12:31 +02:00
Tom Payne
b98aa06008 Export Node.IsContainer 2019-04-23 22:10:42 +02:00
Sam Whited
792d134042 Remove dep on umaintained difflib (#515) 2019-01-21 10:05:15 +02:00
Dmitri Shuralyov
919b1f5b9b
Document SanitizedAnchorName algorithm, copy implementation. (#509)
The goal of this change is to reduce number of non-standard library
packages (repositories) that blackfriday imports (not counting imports
used only for tests) 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.

This change is a port of PR #352 from v1 into v2.

Updates #348.
Updates #350.
2019-01-20 14:20:17 -05:00
autopp
535ad76f61 Fix checking of backslash in link text (#510) (#511) 2019-01-20 20:36:43 +02:00
Martin Treml
55e5149f61 Update README.md (#508) 2019-01-20 20:15:17 +02:00
Robert Lowry
0a297615e6 block.go: set fenceLength (#505) 2019-01-20 20:09:27 +02:00
Sam Whited
8bfdaf1a43 Run go mod tidy (#502) 2018-11-15 22:42:12 +02:00
Bjørn Erik Pedersen
d3b5b032dc v2: Add go.mod (#487) 2018-09-20 20:16:15 +03:00
Cameron Moore
646308596a Run tests in parallel (#480)
Fixes #475
2018-09-08 00:47:14 +03:00
Faruq Rasid
75a3bab973 Add source URL for html entities. 2018-09-07 08:55:38 +08:00
Faruq Rasid
6762cd3685 Only allow valid HTML entities to be unescaped. Do not escape HTML entities in code blocks. 2018-09-06 17:05:43 +08:00
Cameron Moore
2ab1ea34bd Print diffs for reference tests (#481)
Fixes #469
2018-09-05 00:36:14 +03:00
Michael
eebcfd6bbf Run tests against go 1.11 and drop 1.9 (#479) 2018-08-29 21:05:58 +03:00
Vytautas Šaltenis
d85484cdc4
Fix comment about inline footnotes (#473) 2018-08-25 00:13:41 +03:00
Vytautas Šaltenis
5a12bbca53
Drop race detector from Travis builds (#474)
We do not have a single go statement in Blackfriday code, -race does
nothing for us, but burn CPU cycles (and it hurts because we're hitting
timeouts on full test runs).
2018-08-19 14:08:23 +03:00
Vytautas Šaltenis
0e0e3095cb
Fix travis builds on v2: gofmt harder (#470) 2018-08-04 15:05:01 +03:00
Vytautas Šaltenis
e97f103314
Use the same .travis.yml on master and v2 (#462)
Use the same .travis.yml on master and v2
2018-08-04 14:45:05 +03:00
Faruq Rasid
c5c549b063
Fix html renderer escaping valid entities
This should fix #403
2018-07-26 11:48:47 +08:00
Liming Jin
670777b536 add NoopenerLinks (#437) 2018-05-26 10:57:26 +03:00
Emil Melnikov
f04854434e Add heading offset option to HTML renderer (#421)
Setting HTMLRendererParameters.HeadingLevelOffset to L changes
default HTML heading levels from hX to h(X+L).
2018-05-24 21:52:48 +03:00
Rebecca Turner
1bb1d0171c Fixed HTML entity regex (#453)
The old regex missed a lot of HTML entities, like long references
(from 6-character entites like &approx; to the somewhat rarer
&CounterClockwiseContourIntegral;) as well as numeric references
(decimal e.g. &#1234; or hex e.g. &#x13AF6;). This fixes that.
2018-05-24 21:32:58 +03:00
Nick Galbreath
8c0d4cca94 Fix for issue russross/blackfriday#239 (#372)
Issue russross/blackfriday#239 codeblock inside list.
2018-05-24 21:29:34 +03:00
Nathan Glenn
3420fef033 Add full info string in fenced code blocks (#449)
* Add full info string in fenced code blocks

According to common mark, the info string for a fenced code block can be any
non-whitespace string, so adjust the code to read a full string instead of
just the syntax name.

Fixes #410 in v2.

* run go fmt
2018-04-28 13:25:38 +03:00
Kentaro Matsushita
6aeb241ce2 Add a reference for confluence wiki renderer in the README.md. (#446) 2018-04-26 21:51:23 +03:00
Mitchell Cohen
c455fd41c6 Fix consecutive lists of different kinds (#443)
* fixed consecutive lists
* used helper method and addressed flag setting
2018-03-20 21:50:35 +02:00
Vytautas Šaltenis
cfdcce5196
Merge pull request #436 from IainHaslam/v2
v2: Fix HTML5 by removing rel="footnote" which is invalid.
2018-02-25 11:23:46 +02:00
Iain Haslam
ee09303c1a v2: Fix HTML5 by removing rel="footnote" which is invalid.
See #433 for an equivalent change on v1 branch.
2018-02-24 18:23:00 +00:00
Vas Sudanagunta
119f356b88 Fix broken link to v2 in README 2018-02-12 10:33:38 +02: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