Commit Graph

317 Commits

Author SHA1 Message Date
Vytautas Šaltenis
5d3d5c198e Handle comments within a block
Added test cases both for inline and block workflows.

Closes #136.
2015-10-11 11:14:34 +03:00
Russ Ross
8cec3a854e LaTeX backend: add # to list of characters requiring backslash-escaping 2015-07-20 13:48:36 -06:00
Vytautas Šaltenis
386ef80f18 Merge pull request #175 from vbatoufflet/deflist-fix
Fix definition lists end-of-list detection
2015-06-08 11:33:30 +03:00
Vytautas Šaltenis
706b1e01be Merge pull request #176 from tw4452852/index_out_of_range
fix index out of range panic in reference link
2015-06-08 11:31:14 +03:00
Tw
d28de22ef0 fix index out of range panic in reference link
Add checking before accessing the input data.

Fix #172 and #173 issues.

Signed-off-by: Tw <tw19881113@gmail.com>
2015-06-08 15:31:55 +08:00
Vincent Batoufflet
081aa9c378 Fix definition lists end-of-list detection 2015-06-07 09:36:53 +02:00
Vytautas Šaltenis
54d3f20b5c Merge pull request #171 from vbatoufflet/deflist-support
Add definition lists extension support
2015-06-03 10:40:24 +03:00
Vincent Batoufflet
c4825a719d Add definition lists extension support 2015-06-03 08:03:34 +02:00
Vytautas Šaltenis
93ae1e873a Merge pull request #170 from russross/no-newline-after-img
Do not emit newline after <img> tag.
2015-05-26 11:24:09 +03:00
Dmitri Shuralyov
18186eea26 Do not emit newline after <img> tag.
This changes HTML renderer not to always add a newline character after
<img> tags. This is desirable because <img> tags can be inlined, and
sometimes you want to avoid whitespace on left and right sides. Previous
behavior of always adding a newline would unavoidably create whitespace
after <img> tag.

Update all tests to match new behavior. There are few changes, and
they're completely isolated to inline image tests.

Fixes #169.
2015-05-25 12:59:05 -07:00
Dmitri Shuralyov
10880f66e2 README: Update import path of github_flavored_markdown package.
It has moved out into a standalone repo recently. See shurcooL/go#19 for rationale.
2015-05-25 11:54:26 -07:00
Vytautas Šaltenis
0bf420d72a Fix a couple typos 2015-05-23 09:28:21 +03:00
Vytautas Šaltenis
4bed88b4fd Merge branch 'jtolds-master' 2015-05-06 16:00:36 +03:00
Vytautas Šaltenis
314ce8fe44 Add a missing test case for reference override
Exercise link text override.
2015-05-06 15:57:15 +03:00
Vytautas Šaltenis
62f0018e2f Replace snake_case with mixedCase 2015-05-06 15:55:04 +03:00
Vytautas Šaltenis
eeb2c39339 Merge branch 'master' of https://github.com/jtolds/blackfriday into jtolds-master
Conflicts:
	inline_test.go
2015-05-06 15:41:12 +03:00
Vytautas Šaltenis
c6be4fadb1 Merge pull request #161 from rtfb/issue-146
Issue 146
2015-05-06 15:30:31 +03:00
Vytautas Šaltenis
d3270c47ac Merge pull request #163 from neclepsio/master
Implement backslash hard line break extension
2015-04-23 11:58:36 +03:00
neclepsio
58c4ddd431 Added test for backslash line break 2015-04-23 10:49:08 +02:00
neclepsio
68a3c498f6 Add EXTENSION_BACKSLASH_LINE_BREAK 2015-04-22 14:10:44 +02:00
neclepsio
c1917970db Use EXTENSION_BACKSLASH_LINE_BREAK 2015-04-22 14:09:39 +02:00
neclepsio
d4c83fb4da Fix previous commit
Backslash was not removed from output.
2015-04-22 14:04:08 +02:00
neclepsio
2824a549c3 Implement backslash hard line break
See http://spec.commonmark.org/0.18/#example-527
2015-04-22 12:23:19 +02:00
Vytautas Šaltenis
17bb7999de Add Go 1.4 to Travis config 2015-04-11 18:07:21 +03:00
Vytautas Šaltenis
a2702e7449 Simplify isRelativeLink() a bit 2015-04-11 18:06:30 +03:00
Vytautas Šaltenis
b3137e7c8f Merge pull request #152 from elian0211/about_links
update about links
2015-04-09 20:41:45 +03:00
Vytautas Šaltenis
f4655604b3 Cleanup a random bunch of repetitive loops
Replace them with helper function calls.
2015-04-07 21:59:42 +03:00
Vytautas Šaltenis
36787eca3a Allow heading to end with \#
The problem was in a loop that skipped the optional closing hashes in a
heading like this:

    ### This is an H3 ###

Now it checks to see if a hash is escaped and if it is, treats it as a
rightmost character of the heading text, like this:

    ### This is an H3 #\##   ==>   ### This is an H3 ##

Fixes issue #146.
2015-04-07 21:58:29 +03:00
Vytautas Šaltenis
3a90da10e3 Merge pull request #159 from rtfb/sequential-footnotes
Fix recognition of consecutive footnotes
2015-04-05 09:28:21 +03:00
Vytautas Šaltenis
195dac9f5b Fix recognition of consecutive footnotes
The second footnote was treated as if the pair of them were a reference
style link, without checking if the second bit is another footnote.

Fixes issue 158.
2015-04-03 21:08:46 +03:00
Vytautas Šaltenis
2c0c546774 Merge pull request #157 from dchest/reflib
Renaming of upskirt
2015-03-24 18:21:34 +02:00
Dmitry Chestnykh
ef9974b1b7 README: rename libupskirt to Sundown.
The original upskirt library by Natacha Porté has been renamed to
libsoldout, while the fork of it that was located at tanoku/upskirt has
been renamed to Sundown and moved to vmg/sundown. Since Blackfriday has
been started as a translation of tanoku/upskirt, rename its mention in
README to Sundown.
2015-03-24 06:35:19 +01:00
Dmitry Chestnykh
29c5b49e95 Rename upskirtref to testdata; upskirtref_test.go to ref_test.go. 2015-03-24 06:28:49 +01:00
Vytautas Šaltenis
6928e11ecd Merge pull request #155 from beyang/master
add rel="noreferrer" option
2015-03-15 19:31:50 +02:00
Beyang Liu
60b0b4024f add rel="noreferrer" option 2015-03-14 16:46:32 -07:00
elian0211
bd11a52f1e update func isSafeLink 2015-02-25 21:27:13 +08:00
elian0211
27ba4cebef update about links
when link to current directory or parent directory
2015-02-20 17:06:55 +08:00
Vytautas Šaltenis
77efab57b2 Merge pull request #149 from tw4452852/fenced_code
Delete unnecessary copy of input when enable fenced code extension
2015-02-11 10:22:51 +02:00
Tw
d90024b17b Delete unnecessary copy of input when enable fenced code extension
Copy of input waste time and memory.

Signed-off-by: Tw <tw19881113@gmail.com>
2015-02-11 15:44:24 +08:00
Vytautas Šaltenis
4f4aec0109 Merge pull request #145 from eparis/license
Move the license info from README to LICENSE file
2015-02-10 13:09:14 +02:00
Eric Paris
ec46062546 Move the license info from README to LICENSE file
It's pretty standard to have a license file, and some projects require
them before your code can be used in their code.  Move the license to
its own file.
2015-02-09 16:26:22 -05:00
Vytautas Šaltenis
fe5c2f48a9 Merge pull request #142 from anthonyfok/avoid-converting-dates-into-fractions
Avoid converting dates into fractions
2015-01-27 10:58:53 +02:00
Anthony Fok
2c9fe2cd03 Avoid converting dates into fractions
So that dates like 1/2/2005 and 2005/3/4 stay the way it is
without turning into ½/2005 and 2005/¾.

See http://discuss.gohugo.io/t/any-way-to-disable-smart-fractions/328
for discussions.
2015-01-24 15:23:48 -07:00
Vytautas Šaltenis
7001890e79 Merge pull request #140 from russross/update-import-path/sanitized_anchor_name
Update import path of sanitized_anchor_name.
2015-01-12 21:54:11 +02:00
Dmitri Shuralyov
54a323aafb Update import path of sanitized_anchor_name.
It has moved into a smaller standalone repo.
Closes #139.
2015-01-10 18:23:29 -08:00
Vytautas Šaltenis
8ad7215b24 Merge pull request #138 from KenjiTakahashi/emphasis_link
Fix for #19 + some tests for emphasis with links.
2014-12-29 02:32:11 +02:00
KenjiTakahashi
f147218833 fix #19: return immediately from link skipping if end of emphasis is found 2014-12-29 00:34:06 +01:00
KenjiTakahashi
fdda8b88b0 add tests for emphasis with links 2014-12-28 06:28:15 +01:00
JT Olds
8e10236be5 support replacing [refid][] syntax link content with alternate content 2014-12-18 17:36:46 -07:00
JT Olds
5e8b222b69 Add programmable reference overrides
If a user provides a ReferenceOverride function, then reference ids
will be passed to the given ReferenceOverride function first, before
consulting the generated reference table.

The goal here is to enable programmable support for
"WikiWords"-style identifiers or other application-specific
user-generated keywords.

Example, writing documentation:

 The [Frobnosticator][] is a very important class in our codebase.
 While it is used to frobnosticate widgets in general, it can also
 be passed to the [WeeDoodler][] to interesting effect.

This might be solveable with the HTML Renderer relative prefix, but
I didn't see a good way of making a short link to 'Frobnosticator'
relatively without having to write it twice. Maybe
'<Frobnosticator>' should work? Should Autolinks work for relative
links?

In addition, I wanted a little more richness. I plan to support
Godoc links by prefixing references with a '!', like so:

  Check out the [Frobnosticator][] helper function
  [!util.Frobnosticate()][]

The first link links to the Frobnosticator architectural overview
documentation, whereas the second links to Godoc.

Better advice on how to implement this sort of think with
Blackfriday is highly desired.
2014-12-16 16:17:52 -07:00