Commit Graph

314 Commits

Author SHA1 Message Date
Estevão Soares dos Santos
2d593d91f3 fix some tests 2022-11-15 05:00:09 +00:00
Estevão Soares dos Santos
9dab0826c6 improve commonmark compliance 2022-11-15 04:31:13 +00:00
Estevão Soares dos Santos
150c4c36cb Merge branch 'develop' into 922-commonmark-compliance
# Conflicts:
#	src/subParsers/makehtml/heading.js
#	test/functional/makehtml/cases/features/#320.github-compatible-generated-header-id.html
#	test/functional/makehtml/cases/features/#320.github-compatible-generated-header-id.md
2022-11-15 04:01:01 +00:00
Estevão Soares dos Santos
42959b78c1 headings compliance 2022-11-15 02:52:24 +00:00
Barry Pollard
4333646c8c
fix(subParsers): strip international punctuation from github headers (#950) 2022-11-14 18:47:36 +00:00
Estevão Soares dos Santos
75b7707460 codespans partial compliance
Closes #669
2022-05-09 04:11:59 +01:00
Estevão Soares dos Santos
cd293fb61a hard line break implementation 2022-05-09 04:00:29 +01:00
Estevão Soares dos Santos
6e6af3cc03 improve compliance in fenced blocks 2022-05-09 03:17:43 +01:00
Estevão Soares dos Santos
9235131045 some more compliance stuff 2022-05-09 02:38:41 +01:00
Estevão Soares dos Santos
aa12eabf1d several compliance fixes
Closes #191
2022-05-09 01:48:53 +01:00
Estevão Soares dos Santos
9a66e63952 assorted changes 2022-05-07 18:59:09 +01:00
Estevão Soares dos Santos
d99a0d9b03 fix dev dependencies vulnerabilities 2022-05-07 18:43:27 +01:00
Estevão Soares dos Santos
fb31f631e9 improve commonmark compliance 2022-04-28 08:38:48 +01:00
Estevão Soares dos Santos
ce94be0ddf Merge branch 'develop' of github.com:showdownjs/showdown into develop 2022-04-27 21:45:23 +01:00
Estevão Soares dos Santos
00b47b298c test: make commonmark tests optional 2022-04-27 21:45:10 +01:00
Estevão Soares dos Santos
9f8c7199ea
feat(makehtml.events): implements event system refactor for converter.makeHtml (#919)
* startrefactoring the event system

* refactor: blockquotes, code blocks and links refactored

* refactor codeblock to new event system

* refactor subparser until ghcode to new events

* finish adating ghcodeblock to new event

* add headings to new events

* add image to event system

* add emphasisAndStrong to event system

* fix wrong event name in emphasisAndStrong onEnd event

* spanGamut and build

* showdown.helper.event refactored to showdown.Event

* partial

* add links

* add metadata

* add strikethrough and table

* build

* add underline

* add unescapeSpecialChars

* small refactoring

* remove old tables parser

* add lists

* add simple event trigger tests

* build

* fix browserstack

* fix browserstack

* remove testing for ie11 and bumped firefox min version to 45

* fixes and closes #920

* build
2022-04-27 21:42:24 +01:00
Chris Manson
fcbccd6448
test(commonmark): Add updated CommonMark Tests (#918)
* add grunt task to extract commonmark tests

* update commonmark tests

* fix test bootstrap for commonmark tests

* uncomment out the commonmark tests
2022-04-27 21:35:06 +01:00
Estevão Soares dos Santos
3c2e25a3c7 Merge branch 'develop' into feat/910-auto-linking-mention-from-html-to-markdown
# Conflicts:
#	src/subParsers/makemarkdown/table.js
2022-04-16 20:09:50 +01:00
Estevão Soares dos Santos
3a616c5bf6 feat(makeMarkdown.ghMentions): add support for ghMentions in makeMarkdown
Related to #910
2022-04-16 20:06:05 +01:00
Estevão Soares dos Santos
788e329d6e test: fix cli test to work with named versions 2022-03-27 02:17:48 +01:00
Estevão Soares dos Santos
9a3e714b2c test: implement karma and browserstack tests 2022-03-27 00:05:30 +00:00
Chris
5fc843e175
feat(makemarkdown.table): support non-strict tables
* feat(makemarkdown.table): support non-strict tables

change to support non strict html tables.
currently html tables require both 'thead' and 'tbody' to be set.
since there are many tables out there that dont meet these requirements,
i added support for most common tables. all of the following tables will now
work (the last one, is the only version that is currently working):
<table><tr><td>t 0 - missing thead/tbody</td></tr></table>
<table><tr><td>t 1 - missing thead/tbody</td></tr><tr><td>t 1 body</td></tr></table>
<table><thead><tr><th>t 2 - thead only</th></tr></thead></table>
<table><thead><tr><td>t 3 - thead with td</td></tr></thead></table>
<table><tbody><tr><td>t 4 - tbody only</td></tr></tbody></table>
<table><thead><tr><th>t 5 - both thead and tbody</th></tr></thead><tbody><tr><td>t 5</td></tr></tbody></table>
i thought this feature should be made optional in case you only want
to support fully compliant tables. but then i realized, that the options
are only passed to the markdown subparsers, not the html ones.
and since this does not break anything (all tests pass), its ok, i guess...

Closes #687

* refactor: code refactor and added tests

Co-authored-by: Estevão Soares dos Santos <estevao.santos@gmail.com>
2022-03-26 04:18:05 +00:00
chandi
949c2bcf86
fix(email): now email address obfuscation always returns the same output
* feat(helpers): determined results for email address obfuscation

email address is used as the seed, so it should always provide the same result for a given mail.
utilizes a random number generator shown here: https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript/47593316#47593316

* feat(helpers): added Math.imul() support for older browsers

Co-authored-by: Estevão Soares dos Santos <estevao.santos@gmail.com>
2022-03-26 00:31:41 +00:00
Swain
0d3ca4da5a
fix(metadata): allow whitespaces after closing marks
Co-authored-by: Estevão Soares dos Santos <estevao.santos@gmail.com>
2022-03-25 20:55:19 +00:00
CommanderRoot
3eff10bbbf
refactor: replace deprecated String.prototype.substr() (#902)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-25 20:18:41 +00:00
Estevao Soares dos Santos
df76f984a3 chore: add test for repeat helper
Several test cleanups and minor test fixes
2022-03-10 12:56:34 +00:00
Estevao Soares dos Santos
169cd1ed89 clean: clean stray console.log 2022-03-10 00:21:25 +00:00
Estevao Soares dos Santos
1f4a9885cc chore: minor fix in tests 2022-03-10 00:17:27 +00:00
Estevao Soares dos Santos
7acd65e498 fix(cli): remove checking stdin size
Also fix some errors related to testing and inconsistent behavior between linux and windows
2022-03-10 00:09:42 +00:00
Estevao Soares dos Santos
f87cf01282 chore: fix tests for CI 2022-03-09 15:19:34 +00:00
Estevao Soares dos Santos
c3411a567d fix(cli): cli now works properly
The CLI was completely rewrote. Changed dependency from yargs to
commanderjs,
which is cleaner, faster and has no dependencies.
Also added a complete testsuite for the cli.

Merged branch 'cli_refactor' into develop

Closes #893, #894
2022-03-03 12:48:23 +00:00
Estevao Soares dos Santos
8cecdf0382 fix(lists): codeblocks inside lists are now correctly parsed
Closes #494
2022-02-25 01:06:09 +00:00
Estevao Soares dos Santos
5e0ed809db feat(moreStyling): add some useful classes for css styling
Currently, only adds the class `task-list-item-complete` to completed tasks items in GFM tasklists.
But in the future, each time a css class is deemed to be necessary, should be added under this umbrella
option.

Closes #540
2022-02-24 01:57:08 +00:00
Estevao Soares dos Santos
67114255ad fix(gfmCodeBlocks): allow the info string in gfmCodeBlocks to contain spaces
The line with the opening code fence may optionally contain some text following the code fence (the info string); this is trimmed of leading and trailing whitespace and can contain multiple words (but not newlines).

Closes #856
2022-02-24 01:22:11 +00:00
cjwind
626f661e8e
fix(lists): Fix makeMarkdown tasklist (#846)
Fix makeMarkdown() with tasklist by adding input subparser.

Close #774

Co-authored-by: Estevão Soares dos Santos <estevao.santos@gmail.com>
2022-02-24 00:16:31 +00:00
SyntaxRules
d54a6101b9 test(anchor): check other unicode characters 2022-02-07 11:19:44 -07:00
SyntaxRules
17837832b4 test(anchor): no protocol links are still treated as links
Closes https://github.com/showdownjs/showdown/issues/755
2022-02-07 11:07:11 -07:00
SyntaxRules
def6f0b453 test(anchor): fragments work as intended
Closes https://github.com/showdownjs/showdown/issues/845
2022-02-07 10:57:27 -07:00
SyntaxRules
838c5dbecc test(anchor): check that reserved keywords and object properties are usable in links 2022-02-07 10:29:59 -07:00
Dennis Shtatnov
9f779b36a8 fix(extension-registering) removeExtension implementation 2021-11-14 13:48:20 -07:00
Vladimir Vuksanovic
ac1047815f fix(lists): Fix tasklists to comply with GFM
GFM requires a whitespace between brackets.

Closes #655
2021-11-14 13:37:38 -07:00
Devyn S
75ac5c9b6e
Merge pull request #702 from systemsthinkinginstitute/fix-upstream-reference-link-impostors
fix(makeHtml): allow using of squadron brackets in non-link locations
2021-11-14 13:30:06 -07:00
Marco Montalbano
8e2b339fe2
fix(helpers): update github flavored emoji to the latest (#837) 2021-11-14 13:23:03 -07:00
Thomas P
5544e4d995
fix(helpers): update octocat emoji image location; add tests 2021-11-14 13:17:19 -07:00
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