Commit Graph

269 Commits

Author SHA1 Message Date
Devyn S
d5cc678941
Merge pull request #875 from showdownjs/develop
Develop
2021-11-12 10:05:38 -07:00
Devyn S
6efd75cb83
Merge pull request #731 from VladimirV99/ellipsis
feature(ellipsis): Add option to disable ellipsis
2021-11-12 09:58:50 -07:00
Devyn S
45fcc8435b
Merge pull request #698 from systemsthinkinginstitute/fix-space-between-inline-elements
Fix space between inline elements
2021-11-12 09:54:35 -07:00
Devyn S
965789589e
Merge pull request #788 from henrahmagix/include-html51-details-in-block-elements
Include HTML5.1 <details> in known block tags
2021-11-10 13:45:13 -07:00
Sam Harrison
e3a5b5928f feat(relativePathBaseUrl): Add support for prepending a base URL
This feature enables support for prepending a base URL to relative paths in
links and images when converting Markdown to HTML.

Closes #536
2021-11-09 23:34:42 -07:00
Henry Blyth
cb689aa23b Add <details> corresponding makeMarkdown test 2020-04-13 23:05:07 +01:00
Henry Blyth
775f2abe97 Include HTML5.1 <details> in known block tags
Fix #787
2020-04-13 22:55:14 +01:00
Estevao Soares dos Santos
7664beae70 Merge branch 'master' into develop 2019-11-02 21:14:03 +00:00
Jammerware
caab5bb7bc fix: Add rel="noopener noreferrer" to links when openLinksInNewWindow is on
Add rel="noreferrer" to links when openLinksInNewWindow is on. Also add noopener when openLinksInNewWindow is on.

Closes #670
2019-11-02 18:58:07 +00:00
Vladimir Vuksanovic
5d494c8202 feature(ellipsis): Add option to disable ellipsis
Add ability to disable ellipsis parser.
This is needed for some use cases. See #634
Defaults to true to keep backwards compatibility.
2019-10-04 16:45:27 +02:00
David Chester
f0d37ad3c5 rename test files to match convention 2019-05-25 17:13:24 +00:00
David Chester
001b1881d0 preserve spaces between inline elements 2019-05-14 13:15:15 +00:00
David Chester
201969473a fix(makeMarkdown): handle <br> tags converting html to markdown
Convert <br> tags to 2 spaces + newline rather than leaving the tag
in place when converting HTML to MD
2019-01-01 20:22:49 +00:00
Estevao Soares dos Santos
6ee6d8c9d9 rebuild 2018-10-24 03:27:16 +01:00
Vladimir Vuksanovic
4378abb4fa fix(italicsAndBold): Make italicsAndBold lazy (#608)
fix italicsAndBold if literalMidwordUnderscores option is enabled
it should end at the nearest closing underscores, not the furthest

Closes #544
2018-10-24 03:23:28 +01:00
Vladimir Vuksanovic
81edc70da7 fix(underline): Make underline lazy
fix underline if literalMidwordUnderscores option is enabled
it should end at the nearest closing underscores, not the furthest
2018-10-21 15:20:39 +02:00
Estevao Soares dos Santos
d3ebff7ef0 fix(links): a number of issues with links subparser
This is a major refactor of the links subparser, previously known as anchors subparser.

Closes #355, #534

BREAKING CHANGE: `excludeTrailingPunctuationFromURLs` option was removed. This is now the default behavior
2018-09-25 04:04:59 +01:00
Estevao Soares dos Santos
f46479b4ee chore: update readme and add TASKS.TODO.md 2018-09-16 03:45:07 +01:00
Estevao Soares dos Santos
6259f37bd6 fix(gfm-codeblocks): leading space no longer breaks gfm codeblocks
Now GFM Code Blocks can have up to 3 spaces before the backticks

Closes #523
2018-09-15 14:58:50 +01:00
Estevao Soares dos Santos
26abc7a795 fix(headings): inconsistent behavior in lists
In text, headings only require a single linebreak to be treated as such.
However, in lists, they would require a double linebreak.
Now, the behavior in lists and text is consistent, requiring only a single
linebreak.

Closes #495
2018-09-15 14:45:48 +01:00
Estevao Soares dos Santos
d9eea64794 remove(literalMidWordAsterisks): remove literalMidWordAsterisks feature
This feature was seen as a bit "duh!" since midword asterisks are not really a thing and, for these situations, you can simply escape the asterisk character.

Closes #499

BREAKING CHANGE: literalMidWordAsterisks option was removed and so asterisks will always retain their markdown magic meaning in a source text.
If you're using this feature, and you wish to retain this option, you can find a shim here: <https://gist.github.com/tivie/7f8a88c89ffb00d2afe6c59a25528386>
2018-09-14 22:46:03 +01:00
Estevao Soares dos Santos
a4be301331 fix: allow escaping of colons
Previously, you couldn't escape colons (as they were semi-magic markdown characters).
Colons (:) can now be backslash escaped.
2018-09-14 21:34:48 +01:00
Estevao Soares dos Santos
2ba00751cc fix(mentions): allow for usernames with dot, underscore and dash
Closes #574
2018-09-14 17:03:07 +01:00
Estevao Soares dos Santos
b0d475fc08 fix(images): fix js error when using image references
In some circumstances, on a reference style image, the last capturing
group is ignored, which causes the fucntion argument to return the number
of matches instead of a string (or undefined).
Checking if the title parameter is a string ensures that the title
parameter is actually something that was caught by the regex and not some
metadata.

Closes #585
2018-09-14 15:49:24 +01:00
Estevao Soares dos Santos
63763b136f fix(images): fix error when using image references
In some circumstances, on a reference style image, the last capturing
group is ignored, which causes the fucntion argument to return the number
of matches instead of a string (or undefined).
Checking if the title parameter is a string ensures that the title
parameter is actually something that was caught by the regex and not some
metadata.

Closes #585
2018-09-14 15:40:18 +01:00
Estevao Soares dos Santos
0c6b5bdc4b Merge branch 'develop' of https://github.com/showdownjs/showdown into develop
# Conflicts:
#	dist/showdown.js
#	dist/showdown.js.map
#	dist/showdown.min.js
#	dist/showdown.min.js.map
2018-09-14 14:11:08 +01:00
Estevao Soares dos Santos
05ef5c55dc refactor(event dispatcher): make event dispatcher return an object instead of text 2018-09-14 14:10:15 +01:00
Lee Moody
1f0242c6ea fix(gfm-codeblock): add support for spaces before language declaration
One or more spaces before the language declaration of a code block is supported by Github.

E.g.

```    html
<div>HTML!</div>
```

``` html
<div>HTML!</div>
```

```html
<div>HTML!</div>
```

Closes #569
2018-08-08 01:25:32 +01:00
maxwellito
55f22de0a0 fix: compress showdown emoji
* fix showdown emoji compression

* test: fix functional test
2018-05-07 19:27:19 +01:00
Estevao Soares dos Santos
173ad51b05 test: fix tests 2017-12-23 13:20:14 +00:00
Estevao Soares dos Santos
be2a10797c refactor: force brackets in links 2017-12-23 12:41:21 +00:00
Estevao Soares dos Santos
94aa3e53ca test: add tests for reverse converter 2017-12-23 12:35:31 +00:00
Estevao Soares dos Santos
19d2e9f9d4 test: testsuite refactoring 2017-12-22 15:28:41 +00:00
Estevao Soares dos Santos
ea3db5f180 feat(splitAdjacentBlockquotes): add option to split adjacent blockquote blocks
With this option enabled, this:

```md
> some text

> some other text
```

witll result in:

```html
<blockquote>
    <p>some text</p>
</blockquote>
<blockquote>
    <p>some other text</p>
</blockquote>
```

This is the default behavior of GFM.

Closes #477
2017-12-22 10:51:21 +00:00
Estevao Soares dos Santos
187123fed5 release 1.8.5 2017-12-10 19:13:26 +00:00
Estevao Soares dos Santos
63d949f731 feat(metadata): add support for embedded metadata
A simple metadata parser can be useful in markdown documents.
This commit introduces the feature, with the following syntax:

--- or ««« at tstart of the document,
(optionally) followed by a alphanumeric format identifier
followed by key value pairs separated by a colon and a space
followed by --- or ÂÂÂ

Also, adds methods for retrieving the parsed metadata, namely:

getMetadata() and getMetadataFormat

Closes #260
2017-12-10 07:15:09 +00:00
Estevao Soares dos Santos
a8427c9423 feat(completeHTMLOutput): add option to output a complete HTML document 2017-12-10 04:49:24 +00:00
Estevao Soares dos Santos
4ef4c5e674 fix(tables): raw html inside code tags in tables no longer breaks tables
Under certains conditions, raw html inside code tags in tables would break
table parsing. This commit fixes that.

Closes #471
2017-12-05 01:13:11 +00:00
Estevao Soares dos Santos
d6203320aa test: add issue 467 test 2017-11-28 03:07:28 +00:00
Estevao Soares dos Santos
0c933a01f9 fix(tables): pipe character in code spans no longer breaks table
A code span with a pipe character no longer incorrectly breaks the cell table.

Closes #465
2017-11-23 05:39:53 +00:00
Estevao Soares dos Santos
f4f63c5c39 fix(spanGamut): code spans are hashed after parsing
Code spans are now hashed after parsing which means extensions
that listen to spanGamut events no longer need to worry about
escaping "custom" magic chars inside code spans.

Closes #464
2017-11-23 05:18:20 +00:00
Estevao Soares dos Santos
21194c8a03 fix(literalMidWordAsterisks): no longer treats colon as alphanumeric char
Closes #461
2017-11-17 15:23:23 +00:00
Estevao Soares dos Santos
dd7efb5a8a test: small test refactoring 2017-11-16 18:34:02 +00:00
Estevao Soares dos Santos
11936ecb77 fix(openLinksInNewWindow): hash links are not affected by the option
Closes #457
2017-11-11 13:19:19 +00:00
Estevao Soares dos Santos
c956ede4e7 fix(fenced codeblocks): add tilde as fenced code block delimiter
Closes #456
2017-11-11 12:29:36 +00:00
Estevao Soares dos Santos
25f1978666 feat(ellipsis): add auto-ellipsis support
Three dots `...` are now converted automatically into an ellipsis
2017-10-24 17:06:08 +01:00
Estevao Soares dos Santos
084b819b14 feat(underline): add EXPERIMENTAL support for underline
Syntax is:
```
__double underscores__
or
___triple unserscores___
```
Keep in mind that, with this option enabled, underscore no longer
parses as `<em>` or `<strong>`

Closes #450
2017-10-24 16:46:40 +01:00
Estevao Soares dos Santos
9cdc35e705 feat(ol start num): add support for defining the first num of ol
Implement support for starting ordered lists at an arbitrary number

Closes #377
BREAKING CHANGE: Since showdown now supports starting ordered lists
at an arbitrary number, list output may differ.
2017-10-24 15:15:56 +01:00
Estevao Soares dos Santos
5b8f1d312f feat(emoji): add emoji support
Add unicode emoji support to showdown. To enable this feature,
use `emoji: true` option. A list of supported emojis is
available here: https://github.com/showdownjs/showdown/wiki/Emojis

Closes #448
2017-10-24 13:44:49 +01:00
Estevao Soares dos Santos
61929bb262 fix(autolinks): prevent _ and * to be parsed in links
Closes #444
2017-10-24 10:22:13 +01:00