Commit graph

77 commits

Author SHA1 Message Date
dakkar
cb611b278b avoid using the /v modifier
it's not supported by many browsers, also the vue/vite compiler
refuses to allow it
2023-12-28 14:12:55 +00:00
dakkar
8818a2df9a test that I've not broken whitespace handling 2023-12-28 08:45:03 +00:00
dakkar
4ff4ee6fd2 allow more non-ascii in markup 2023-12-28 08:33:43 +00:00
dakkar
2df8cee5bd fix search-related tests 2023-12-26 17:15:52 +00:00
syuilo
ae92c2a9d0 chore: use test instead of it 2023-02-04 09:30:39 +09:00
syuilo
48d2027c25 add some tests 2023-02-04 09:28:34 +09:00
syuilo
08cb023e9d tweak fn parsing 2023-01-14 08:59:32 +09:00
syuilo
f916d5bd8f remove fnNameList option for more consistency 2023-01-14 08:56:48 +09:00
syuilo
013f3af23e improve emoji code parsing
Fix #129
2023-01-09 16:05:16 +09:00
marihachi
5fe291a7e7
TypeScript版パーサーのマージ (#124)
* implement parser with TypeScript (#116)

* clean parser

* parser, success, failure, str, parser.map

* seq

* atLeast, any, alt, match, notMatch

* mergeText

* improve seq

* lazy, createLanguage

* types

* regexp, refactor

* nest limit

* lint

* state

* syntaxes

* sep1, succeeded, option, fn

* simple

* strikeWave, plainTag, inlineCode, mathInline

* mention, refactor

* seqPartial

* 🚀

* parser trace

* fix mention, implement hashtag

* lineBegin, lineEnd, refactor

* imple codeBlock, fix lineEnd

* codeBlock, mathBlock

* fix codeBlock

* fix mathBlock

* fix codeBlock

* lint

* fix inlineCode

* 🚀

* centerTag

* fix nesting limit

* fix unicodeEmoji

* 🚀

* search

* refactor

* seqPartial -> seqOrText

* lint

* url, urlAlt

* 🚀

* 🚀

* text

* fix

* link

* linkLabel state

* lint

* nesting limit for link label

* fix url bracket pair

* nest

* refactor

* refactor

* remove

* add test

* wip quote

* add quote test

* quote

* refactor

* hashtag

* refactor

* type

* type

* refactor

* lint

* url

* italicAsta, italicUnder

* italicAsta, italicUnder, mention, rethink spec

* rethink spec

* test: change implementation-dependent parts

* hashtag

* add mention test

* mention

* mention

* mention

* mention

* url

* test

* hashtag

* Revert "Auxiliary commit to revert individual files from 373972beef10eb99ff3e3635a32a207854154a2a"

This reverts commit 622b66e20778ad5c283ea7629db853cbf2bb601f.

* package-lock

* Update tsconfig.json

* Update tsconfig.json

* ignore a tsd error when importing twemoji-parser regexp

* lint

* lint

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>

* v0.23.0-canary.1

* readme

* update chagelog

* update changelog

* update changelog

* refactor

* update core combinators

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2022-07-22 02:21:56 +09:00
marihachi
aa893a8477
implement plain syntax (#114)
* implement plain syntax

* public api

* plain syntax

* public api

* plain syntax

* Update test/parser.ts

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>

* plain parser -> simple parser

* nomfm -> plain

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2022-06-07 23:41:09 +09:00
marihachi
e38a6e6576
ハッシュタグの変更 (#111)
* fix #110

* add tests for hashtag
2022-05-21 19:33:28 +09:00
marihachi
49941cd9ba
リンクラベル関係の変更 (#107)
* fix link label matching

* 🚀
* add syntax rules of link label
* fix #104
* remove unnecessary applyParser() call
2022-05-12 20:31:29 +09:00
marihachi
d9b8b8db5f
quoteのネスト制限を追加 (#91)
* refactor quote

* add nesting limit test for quote

* nesting limit for quote
2022-01-10 13:40:37 +09:00
marihachi
6aaa34403a fix bug of link label parsing 2022-01-09 18:21:57 +09:00
marihachi
93895b8a01
Introduce nesting limit (#87)
* support fnDepthLimit

* fix parse option

* rename fnDepthLimit to nestLimit

* support limit nesting: big, bold, small, italic, strike

* improve mention

* fix hashtag

* support limit nesting: hashtag

* support limit nesting: url

* refine link label

* refactor

* fix link

* change default value of nestLimit

* fix link label

* add test

* restore and modify test
2022-01-06 01:05:37 +09:00
marihachi
051e903d43 add test 2021-10-17 14:33:22 +09:00
marihachi
ffe1e3ffca add test 2021-10-17 14:25:59 +09:00
marihachi
d037c2780a
linkノードのurlプロパティを修正 (#84)
* add test

* fix bug
2021-10-14 20:24:13 +09:00
marihachi
00e89d23d7
Supports white list for function syntax (#77)
* support name list for FN syntax

* use default parameter

Co-authored-by: Johann150 <johann.galle@protonmail.com>

Co-authored-by: Johann150 <johann.galle@protonmail.com>
2021-10-02 09:26:56 +09:00
marihachi
703f82215d
remove fn v1 syntax (#79) 2021-10-01 22:05:11 +09:00
Johann150
3857b03faf
add bold and strikethrough tag (#76) 2021-09-30 00:39:14 +09:00
Johann150
e6af8bc92a
hashtag can not include XML tags (#74) 2021-08-28 19:03:01 +09:00
syuilo
e0ca4931e6 Revert "understand other URL schemes too (#73)"
This reverts commit a7315926ab.
2021-08-24 11:58:19 +09:00
Johann150
a7315926ab
understand other URL schemes too (#73) 2021-08-19 10:19:23 +09:00
syuilo
9287a3b5b9 Introduce api-extractor and lint 2021-07-31 15:12:43 +09:00
syuilo
047474831b add test 2021-07-23 11:24:04 +09:00
marihachi
4c20bcb053 add brackets property of url node 2021-07-22 20:58:27 +09:00
syuilo
3d3032aa71 Introduce coverage integration 2021-06-26 23:48:46 +09:00
syuilo
faacf34ba0 Add link test 2021-06-26 23:16:09 +09:00
marihachi
985d24b4bd add quote test 2021-06-12 12:53:11 +09:00
syuilo
d423915f06 Add mathInline test 2021-06-07 23:27:45 +09:00
syuilo
ba9b937d8f Add strike test 2021-06-06 23:54:51 +09:00
syuilo
294e7a5574 Add PlainParser tests 2021-06-05 16:46:54 +09:00
syuilo
87cb008c26 Add hashtag tests 2021-06-05 16:34:38 +09:00
syuilo
3a5732ce7d Add code block tests 2021-06-05 16:23:49 +09:00
syuilo
5e7f17427b Add inlineCode tests 2021-06-05 16:21:22 +09:00
syuilo
916ee3e012 Add link tests 2021-06-05 16:17:56 +09:00
syuilo
1ee9f95396 Add url tests 2021-06-05 15:56:23 +09:00
marihachi
2b68b59c2a Revert "disable nest tests"
This reverts commit 4eec75ad39.
2021-06-05 15:42:06 +09:00
marihachi
ebef52cf33 update test 2021-05-07 00:28:24 +09:00
marihachi
4eec75ad39 disable nest tests 2021-04-24 13:32:55 +09:00
marihachi
152b947044 fix test 2021-04-19 10:27:06 +09:00
marihachi
627a516cc9 Parser: implement fn syntax (version 2) 2021-04-18 14:38:15 +09:00
marihachi
e67d14b813 resolve #46 2021-04-17 15:35:07 +09:00
marihachi
be39aab80d inspect API accept a single node. 2021-04-17 11:34:32 +09:00
marihachi
5ff959c790 add test 2021-04-15 16:53:55 +09:00
marihachi
7f353dab51 improve mention 2021-04-15 15:51:08 +09:00
marihachi
2030fd3537 add test 2021-04-15 15:14:21 +09:00
marihachi
6ac576b748 improve hashtag detection (#43) 2021-04-15 15:14:21 +09:00