Compare commits

...

24 Commits

Author SHA1 Message Date
Natty 146c072c92
Merge branch 'development'
ci/woodpecker/push/ociImagePush Pipeline was successful Details
2023-10-24 00:30:44 +02:00
Natty c4a8ebebf3
MMM: Janky outer flanking rules implementation 2023-10-24 00:27:54 +02:00
Natty 42fa83c6e2
MMM: Fixed hashtag parsing 2023-10-23 23:52:02 +02:00
Natty 86d5c87e9a
MMM: Nesting-limited parsing 2023-10-16 23:45:45 +02:00
Natty 23a63f2fe9
MMM: Made the parser always output owned tokens 2023-10-14 21:41:36 +02:00
Natty d0d977e6eb
Fixed URL parsing and initial flanking rules implementation 2023-10-08 22:15:55 +02:00
Natty 26bd6fe4b2
Normalized tests 2023-10-07 21:26:25 +02:00
Natty c4fd99fa45
Stricter URL parsing 2023-10-07 21:22:21 +02:00
Natty d2bc679740
Fixed link parsing 2023-10-07 20:40:01 +02:00
Natty 154cc27c07
More precise emoji extraction and fixed center tag parsing 2023-10-07 19:44:39 +02:00
Natty 95bce443be
Fixed a code typo 2023-10-07 01:53:03 +02:00
Natty 703e1191c2
Janky sequence unnesting and attempting to salvage nested parsing in incorrect formatting tags 2023-10-07 01:46:20 +02:00
Natty 453891ddf4
Connected it all 2023-10-06 00:17:52 +02:00
Natty c45ec852dd
Shortcode emoji parsing 2023-10-05 22:32:53 +02:00
Natty 4431a3ad62
Code block parsing 2023-10-05 22:25:29 +02:00
Natty a6ee6bfbde
Plain tag parsing 2023-10-05 22:12:51 +02:00
Natty 7c8e65f556
Hashtag parsing 2023-10-05 22:02:46 +02:00
Natty 8009546bfe
Emoji parsing 2023-10-05 21:21:23 +02:00
Natty 52dc491a47
Mention parsing 2023-10-05 20:05:03 +02:00
Natty 9b26691ff4
Implemented URL parsing 2023-10-05 19:09:26 +02:00
Natty 24d44632e0
Minor cleanup 2023-10-04 19:44:27 +02:00
Natty 46e0766a36
Implemented MFM functions and math and center blocks 2023-10-04 19:31:03 +02:00
Natty 1af8f4e213
Basic inline tag parsing 2023-10-04 16:29:35 +02:00
Natty 95141388fa
Created a project for the MMM parser 2023-10-04 16:29:35 +02:00
5 changed files with 2099 additions and 5 deletions

69
Cargo.lock generated
View File

@ -411,6 +411,12 @@ dependencies = [
"syn 1.0.109", "syn 1.0.109",
] ]
[[package]]
name = "bytecount"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c"
[[package]] [[package]]
name = "byteorder" name = "byteorder"
version = "1.4.3" version = "1.4.3"
@ -456,6 +462,15 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663" checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663"
[[package]]
name = "castaway"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a17ed5635fc8536268e5d4de1e22e81ac34419e5f052d4d51f4e01dcc263fcc"
dependencies = [
"rustversion",
]
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.81" version = "1.0.81"
@ -578,6 +593,19 @@ dependencies = [
"tokio-util", "tokio-util",
] ]
[[package]]
name = "compact_str"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f"
dependencies = [
"castaway",
"cfg-if",
"itoa",
"ryu",
"static_assertions",
]
[[package]] [[package]]
name = "const-oid" name = "const-oid"
version = "0.9.4" version = "0.9.4"
@ -742,6 +770,15 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "emojis"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ee61eb945bff65ee7d19d157d39c67c33290ff0742907413fd5eefd29edc979"
dependencies = [
"phf",
]
[[package]] [[package]]
name = "equivalent" name = "equivalent"
version = "1.0.1" version = "1.0.1"
@ -1603,6 +1640,19 @@ dependencies = [
"windows-sys", "windows-sys",
] ]
[[package]]
name = "mmm_parser"
version = "0.2.1-alpha"
dependencies = [
"compact_str",
"either",
"emojis",
"nom",
"nom_locate",
"tracing",
"unicode-segmentation",
]
[[package]] [[package]]
name = "nom" name = "nom"
version = "7.1.3" version = "7.1.3"
@ -1613,6 +1663,17 @@ dependencies = [
"minimal-lexical", "minimal-lexical",
] ]
[[package]]
name = "nom_locate"
version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e3c83c053b0713da60c5b8de47fe8e494fe3ece5267b2f23090a07a053ba8f3"
dependencies = [
"bytecount",
"memchr",
"nom",
]
[[package]] [[package]]
name = "nu-ansi-term" name = "nu-ansi-term"
version = "0.46.0" version = "0.46.0"
@ -2474,18 +2535,18 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.180" version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.180" version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",

View File

@ -14,6 +14,7 @@ members = [
"fe_calckey", "fe_calckey",
"magnetar_common", "magnetar_common",
"magnetar_sdk", "magnetar_sdk",
"magnetar_mmm_parser",
"core" "core"
] ]
@ -27,7 +28,10 @@ axum = "0.6"
cached = "0.46" cached = "0.46"
cfg-if = "1" cfg-if = "1"
chrono = "0.4" chrono = "0.4"
compact_str = "0.7"
dotenvy = "0.15" dotenvy = "0.15"
either = "1.9"
emojis = "0.6"
futures-core = "0.3" futures-core = "0.3"
futures-util = "0.3" futures-util = "0.3"
headers = "0.3" headers = "0.3"
@ -36,8 +40,11 @@ hyper = "0.14"
js-sys = "0.3" js-sys = "0.3"
log = "0.4" log = "0.4"
miette = "5.9" miette = "5.9"
nom = "7"
nom_locate = "4"
percent-encoding = "2.2" percent-encoding = "2.2"
redis = "0.23" redis = "0.23"
regex = "1.9"
reqwest = "0.11" reqwest = "0.11"
sea-orm = "0.12" sea-orm = "0.12"
sea-orm-migration = "0.12" sea-orm-migration = "0.12"
@ -98,4 +105,4 @@ toml = { workspace = true }
unicode-segmentation = { workspace = true } unicode-segmentation = { workspace = true }
[profile.release] [profile.release]
lto = true lto = true

View File

@ -0,0 +1,14 @@
[package]
name = "mmm_parser"
version.workspace = true
edition.workspace = true
license = "MIT OR Apache-2.0"
[dependencies]
either = { workspace = true }
emojis = { workspace = true }
nom = { workspace = true }
nom_locate = { workspace = true }
compact_str = { workspace = true }
tracing = { workspace = true }
unicode-segmentation = { workspace = true }

View File

@ -0,0 +1,5 @@
# MMM
Magnetar {marinated, modified} Markdown?
#TODO: Finish docs

File diff suppressed because it is too large Load Diff