♻️ Simple & Efficient Gemini-to-HTTP Proxy fuwn.net
proxy gemini-protocol protocol gemini http rust
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(html): use markdown safety

Fuwn 5539b524 bb72edfd

+414 -23
+405 -19
Cargo.lock
··· 228 228 ] 229 229 230 230 [[package]] 231 + name = "anstream" 232 + version = "0.6.14" 233 + source = "registry+https://github.com/rust-lang/crates.io-index" 234 + checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" 235 + dependencies = [ 236 + "anstyle", 237 + "anstyle-parse", 238 + "anstyle-query", 239 + "anstyle-wincon", 240 + "colorchoice", 241 + "is_terminal_polyfill", 242 + "utf8parse", 243 + ] 244 + 245 + [[package]] 246 + name = "anstyle" 247 + version = "1.0.7" 248 + source = "registry+https://github.com/rust-lang/crates.io-index" 249 + checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" 250 + 251 + [[package]] 252 + name = "anstyle-parse" 253 + version = "0.2.4" 254 + source = "registry+https://github.com/rust-lang/crates.io-index" 255 + checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" 256 + dependencies = [ 257 + "utf8parse", 258 + ] 259 + 260 + [[package]] 261 + name = "anstyle-query" 262 + version = "1.1.0" 263 + source = "registry+https://github.com/rust-lang/crates.io-index" 264 + checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" 265 + dependencies = [ 266 + "windows-sys 0.52.0", 267 + ] 268 + 269 + [[package]] 270 + name = "anstyle-wincon" 271 + version = "3.0.3" 272 + source = "registry+https://github.com/rust-lang/crates.io-index" 273 + checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" 274 + dependencies = [ 275 + "anstyle", 276 + "windows-sys 0.52.0", 277 + ] 278 + 279 + [[package]] 231 280 name = "anyhow" 232 281 version = "1.0.86" 233 282 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 252 301 checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 253 302 254 303 [[package]] 304 + name = "bincode" 305 + version = "1.3.3" 306 + source = "registry+https://github.com/rust-lang/crates.io-index" 307 + checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 308 + dependencies = [ 309 + "serde", 310 + ] 311 + 312 + [[package]] 313 + name = "bit-set" 314 + version = "0.5.3" 315 + source = "registry+https://github.com/rust-lang/crates.io-index" 316 + checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" 317 + dependencies = [ 318 + "bit-vec", 319 + ] 320 + 321 + [[package]] 322 + name = "bit-vec" 323 + version = "0.6.3" 324 + source = "registry+https://github.com/rust-lang/crates.io-index" 325 + checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 326 + 327 + [[package]] 255 328 name = "bitflags" 256 329 version = "1.3.2" 257 330 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 336 409 ] 337 410 338 411 [[package]] 412 + name = "caseless" 413 + version = "0.2.1" 414 + source = "registry+https://github.com/rust-lang/crates.io-index" 415 + checksum = "808dab3318747be122cb31d36de18d4d1c81277a76f8332a02b81a3d73463d7f" 416 + dependencies = [ 417 + "regex", 418 + "unicode-normalization", 419 + ] 420 + 421 + [[package]] 339 422 name = "cc" 340 423 version = "1.0.79" 341 424 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 351 434 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 352 435 353 436 [[package]] 437 + name = "clap" 438 + version = "4.5.10" 439 + source = "registry+https://github.com/rust-lang/crates.io-index" 440 + checksum = "8f6b81fb3c84f5563d509c59b5a48d935f689e993afa90fe39047f05adef9142" 441 + dependencies = [ 442 + "clap_builder", 443 + "clap_derive", 444 + ] 445 + 446 + [[package]] 447 + name = "clap_builder" 448 + version = "4.5.10" 449 + source = "registry+https://github.com/rust-lang/crates.io-index" 450 + checksum = "5ca6706fd5224857d9ac5eb9355f6683563cc0541c7cd9d014043b57cbec78ac" 451 + dependencies = [ 452 + "anstream", 453 + "anstyle", 454 + "clap_lex", 455 + "strsim", 456 + "terminal_size", 457 + ] 458 + 459 + [[package]] 460 + name = "clap_derive" 461 + version = "4.5.8" 462 + source = "registry+https://github.com/rust-lang/crates.io-index" 463 + checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" 464 + dependencies = [ 465 + "heck", 466 + "proc-macro2", 467 + "quote", 468 + "syn 2.0.66", 469 + ] 470 + 471 + [[package]] 472 + name = "clap_lex" 473 + version = "0.7.1" 474 + source = "registry+https://github.com/rust-lang/crates.io-index" 475 + checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" 476 + 477 + [[package]] 354 478 name = "clru" 355 479 version = "0.6.1" 356 480 source = "registry+https://github.com/rust-lang/crates.io-index" 357 481 checksum = "b8191fa7302e03607ff0e237d4246cc043ff5b3cb9409d995172ba3bea16b807" 358 482 359 483 [[package]] 484 + name = "colorchoice" 485 + version = "1.0.1" 486 + source = "registry+https://github.com/rust-lang/crates.io-index" 487 + checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" 488 + 489 + [[package]] 490 + name = "comrak" 491 + version = "0.26.0" 492 + source = "registry+https://github.com/rust-lang/crates.io-index" 493 + checksum = "395ab67843c57df5a4ee29d610740828dbc928cc64ecf0f2a1d5cd0e98e107a9" 494 + dependencies = [ 495 + "caseless", 496 + "clap", 497 + "derive_builder", 498 + "entities", 499 + "memchr", 500 + "once_cell", 501 + "regex", 502 + "shell-words", 503 + "slug", 504 + "syntect", 505 + "typed-arena", 506 + "unicode_categories", 507 + "xdg", 508 + ] 509 + 510 + [[package]] 360 511 name = "convert_case" 361 512 version = "0.4.0" 362 513 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 402 553 ] 403 554 404 555 [[package]] 556 + name = "darling" 557 + version = "0.20.10" 558 + source = "registry+https://github.com/rust-lang/crates.io-index" 559 + checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" 560 + dependencies = [ 561 + "darling_core", 562 + "darling_macro", 563 + ] 564 + 565 + [[package]] 566 + name = "darling_core" 567 + version = "0.20.10" 568 + source = "registry+https://github.com/rust-lang/crates.io-index" 569 + checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" 570 + dependencies = [ 571 + "fnv", 572 + "ident_case", 573 + "proc-macro2", 574 + "quote", 575 + "strsim", 576 + "syn 2.0.66", 577 + ] 578 + 579 + [[package]] 580 + name = "darling_macro" 581 + version = "0.20.10" 582 + source = "registry+https://github.com/rust-lang/crates.io-index" 583 + checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" 584 + dependencies = [ 585 + "darling_core", 586 + "quote", 587 + "syn 2.0.66", 588 + ] 589 + 590 + [[package]] 405 591 name = "deranged" 406 592 version = "0.3.11" 407 593 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 411 597 ] 412 598 413 599 [[package]] 600 + name = "derive_builder" 601 + version = "0.20.0" 602 + source = "registry+https://github.com/rust-lang/crates.io-index" 603 + checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" 604 + dependencies = [ 605 + "derive_builder_macro", 606 + ] 607 + 608 + [[package]] 609 + name = "derive_builder_core" 610 + version = "0.20.0" 611 + source = "registry+https://github.com/rust-lang/crates.io-index" 612 + checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" 613 + dependencies = [ 614 + "darling", 615 + "proc-macro2", 616 + "quote", 617 + "syn 2.0.66", 618 + ] 619 + 620 + [[package]] 621 + name = "derive_builder_macro" 622 + version = "0.20.0" 623 + source = "registry+https://github.com/rust-lang/crates.io-index" 624 + checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" 625 + dependencies = [ 626 + "derive_builder_core", 627 + "syn 2.0.66", 628 + ] 629 + 630 + [[package]] 414 631 name = "derive_more" 415 632 version = "0.99.17" 416 633 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 422 639 "rustc_version", 423 640 "syn 1.0.109", 424 641 ] 642 + 643 + [[package]] 644 + name = "deunicode" 645 + version = "1.6.0" 646 + source = "registry+https://github.com/rust-lang/crates.io-index" 647 + checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" 425 648 426 649 [[package]] 427 650 name = "digest" ··· 466 689 ] 467 690 468 691 [[package]] 692 + name = "entities" 693 + version = "1.0.1" 694 + source = "registry+https://github.com/rust-lang/crates.io-index" 695 + checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" 696 + 697 + [[package]] 469 698 name = "env_logger" 470 699 version = "0.10.0" 471 700 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 492 721 dependencies = [ 493 722 "libc", 494 723 "windows-sys 0.52.0", 724 + ] 725 + 726 + [[package]] 727 + name = "fancy-regex" 728 + version = "0.11.0" 729 + source = "registry+https://github.com/rust-lang/crates.io-index" 730 + checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" 731 + dependencies = [ 732 + "bit-set", 733 + "regex", 495 734 ] 496 735 497 736 [[package]] ··· 1142 1381 checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 1143 1382 1144 1383 [[package]] 1384 + name = "heck" 1385 + version = "0.5.0" 1386 + source = "registry+https://github.com/rust-lang/crates.io-index" 1387 + checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 1388 + 1389 + [[package]] 1145 1390 name = "hermit-abi" 1146 1391 version = "0.2.6" 1147 1392 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1163 1408 checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" 1164 1409 dependencies = [ 1165 1410 "windows-sys 0.48.0", 1166 - ] 1167 - 1168 - [[package]] 1169 - name = "html-escape" 1170 - version = "0.2.13" 1171 - source = "registry+https://github.com/rust-lang/crates.io-index" 1172 - checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" 1173 - dependencies = [ 1174 - "utf8-width", 1175 1411 ] 1176 1412 1177 1413 [[package]] ··· 1322 1558 ] 1323 1559 1324 1560 [[package]] 1561 + name = "ident_case" 1562 + version = "1.0.1" 1563 + source = "registry+https://github.com/rust-lang/crates.io-index" 1564 + checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1565 + 1566 + [[package]] 1325 1567 name = "idna" 1326 1568 version = "1.0.0" 1327 1569 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1376 1618 ] 1377 1619 1378 1620 [[package]] 1621 + name = "is_terminal_polyfill" 1622 + version = "1.70.0" 1623 + source = "registry+https://github.com/rust-lang/crates.io-index" 1624 + checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" 1625 + 1626 + [[package]] 1379 1627 name = "itoa" 1380 1628 version = "1.0.6" 1381 1629 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1410 1658 version = "0.2.155" 1411 1659 source = "registry+https://github.com/rust-lang/crates.io-index" 1412 1660 checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" 1661 + 1662 + [[package]] 1663 + name = "linked-hash-map" 1664 + version = "0.5.6" 1665 + source = "registry+https://github.com/rust-lang/crates.io-index" 1666 + checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 1413 1667 1414 1668 [[package]] 1415 1669 name = "linux-raw-sys" ··· 1541 1795 1542 1796 [[package]] 1543 1797 name = "once_cell" 1544 - version = "1.17.1" 1798 + version = "1.19.0" 1799 + source = "registry+https://github.com/rust-lang/crates.io-index" 1800 + checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 1801 + 1802 + [[package]] 1803 + name = "onig" 1804 + version = "6.4.0" 1805 + source = "registry+https://github.com/rust-lang/crates.io-index" 1806 + checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f" 1807 + dependencies = [ 1808 + "bitflags 1.3.2", 1809 + "libc", 1810 + "once_cell", 1811 + "onig_sys", 1812 + ] 1813 + 1814 + [[package]] 1815 + name = "onig_sys" 1816 + version = "69.8.1" 1545 1817 source = "registry+https://github.com/rust-lang/crates.io-index" 1546 - checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" 1818 + checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7" 1819 + dependencies = [ 1820 + "cc", 1821 + "pkg-config", 1822 + ] 1547 1823 1548 1824 [[package]] 1549 1825 name = "parking_lot" ··· 1599 1875 checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 1600 1876 1601 1877 [[package]] 1878 + name = "plist" 1879 + version = "1.7.0" 1880 + source = "registry+https://github.com/rust-lang/crates.io-index" 1881 + checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" 1882 + dependencies = [ 1883 + "base64", 1884 + "indexmap", 1885 + "quick-xml", 1886 + "serde", 1887 + "time", 1888 + ] 1889 + 1890 + [[package]] 1602 1891 name = "powerfmt" 1603 1892 version = "0.2.0" 1604 1893 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1636 1925 checksum = "744a264d26b88a6a7e37cbad97953fa233b94d585236310bcbc88474b4092d79" 1637 1926 1638 1927 [[package]] 1928 + name = "quick-xml" 1929 + version = "0.32.0" 1930 + source = "registry+https://github.com/rust-lang/crates.io-index" 1931 + checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" 1932 + dependencies = [ 1933 + "memchr", 1934 + ] 1935 + 1936 + [[package]] 1639 1937 name = "quote" 1640 1938 version = "1.0.36" 1641 1939 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1700 1998 dependencies = [ 1701 1999 "aho-corasick", 1702 2000 "memchr", 1703 - "regex-syntax", 2001 + "regex-syntax 0.7.1", 1704 2002 ] 1705 2003 1706 2004 [[package]] ··· 1722 2020 checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" 1723 2021 1724 2022 [[package]] 2023 + name = "regex-syntax" 2024 + version = "0.8.4" 2025 + source = "registry+https://github.com/rust-lang/crates.io-index" 2026 + checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" 2027 + 2028 + [[package]] 1725 2029 name = "ring" 1726 2030 version = "0.16.20" 1727 2031 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1843 2147 dependencies = [ 1844 2148 "actix-web", 1845 2149 "anyhow", 2150 + "comrak", 1846 2151 "dotenv", 1847 2152 "germ", 1848 - "html-escape", 1849 2153 "log", 1850 2154 "pretty_env_logger", 1851 2155 "url", ··· 1913 2217 checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" 1914 2218 1915 2219 [[package]] 2220 + name = "shell-words" 2221 + version = "1.1.0" 2222 + source = "registry+https://github.com/rust-lang/crates.io-index" 2223 + checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" 2224 + 2225 + [[package]] 1916 2226 name = "signal-hook" 1917 2227 version = "0.3.15" 1918 2228 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1941 2251 ] 1942 2252 1943 2253 [[package]] 2254 + name = "slug" 2255 + version = "0.1.5" 2256 + source = "registry+https://github.com/rust-lang/crates.io-index" 2257 + checksum = "3bd94acec9c8da640005f8e135a39fc0372e74535e6b368b7a04b875f784c8c4" 2258 + dependencies = [ 2259 + "deunicode", 2260 + "wasm-bindgen", 2261 + ] 2262 + 2263 + [[package]] 1944 2264 name = "smallvec" 1945 2265 version = "1.13.2" 1946 2266 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1977 2297 version = "1.2.0" 1978 2298 source = "registry+https://github.com/rust-lang/crates.io-index" 1979 2299 checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 2300 + 2301 + [[package]] 2302 + name = "strsim" 2303 + version = "0.11.1" 2304 + source = "registry+https://github.com/rust-lang/crates.io-index" 2305 + checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 1980 2306 1981 2307 [[package]] 1982 2308 name = "syn" ··· 2012 2338 ] 2013 2339 2014 2340 [[package]] 2341 + name = "syntect" 2342 + version = "5.2.0" 2343 + source = "registry+https://github.com/rust-lang/crates.io-index" 2344 + checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1" 2345 + dependencies = [ 2346 + "bincode", 2347 + "bitflags 1.3.2", 2348 + "fancy-regex", 2349 + "flate2", 2350 + "fnv", 2351 + "once_cell", 2352 + "onig", 2353 + "plist", 2354 + "regex-syntax 0.8.4", 2355 + "serde", 2356 + "serde_derive", 2357 + "serde_json", 2358 + "thiserror", 2359 + "walkdir", 2360 + "yaml-rust", 2361 + ] 2362 + 2363 + [[package]] 2015 2364 name = "tempfile" 2016 2365 version = "3.5.0" 2017 2366 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2031 2380 checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 2032 2381 dependencies = [ 2033 2382 "winapi-util", 2383 + ] 2384 + 2385 + [[package]] 2386 + name = "terminal_size" 2387 + version = "0.3.0" 2388 + source = "registry+https://github.com/rust-lang/crates.io-index" 2389 + checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" 2390 + dependencies = [ 2391 + "rustix 0.38.34", 2392 + "windows-sys 0.48.0", 2034 2393 ] 2035 2394 2036 2395 [[package]] ··· 2187 2546 ] 2188 2547 2189 2548 [[package]] 2549 + name = "typed-arena" 2550 + version = "2.0.2" 2551 + source = "registry+https://github.com/rust-lang/crates.io-index" 2552 + checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" 2553 + 2554 + [[package]] 2190 2555 name = "typenum" 2191 2556 version = "1.16.0" 2192 2557 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2212 2577 dependencies = [ 2213 2578 "tinyvec", 2214 2579 ] 2580 + 2581 + [[package]] 2582 + name = "unicode_categories" 2583 + version = "0.1.1" 2584 + source = "registry+https://github.com/rust-lang/crates.io-index" 2585 + checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" 2215 2586 2216 2587 [[package]] 2217 2588 name = "untrusted" ··· 2237 2608 checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" 2238 2609 2239 2610 [[package]] 2240 - name = "utf8-width" 2241 - version = "0.1.7" 2242 - source = "registry+https://github.com/rust-lang/crates.io-index" 2243 - checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" 2244 - 2245 - [[package]] 2246 2611 name = "utf8_iter" 2247 2612 version = "1.0.4" 2248 2613 source = "registry+https://github.com/rust-lang/crates.io-index" 2249 2614 checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 2615 + 2616 + [[package]] 2617 + name = "utf8parse" 2618 + version = "0.2.2" 2619 + source = "registry+https://github.com/rust-lang/crates.io-index" 2620 + checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 2250 2621 2251 2622 [[package]] 2252 2623 name = "vergen" ··· 2603 2974 version = "0.5.5" 2604 2975 source = "registry+https://github.com/rust-lang/crates.io-index" 2605 2976 checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" 2977 + 2978 + [[package]] 2979 + name = "xdg" 2980 + version = "2.5.2" 2981 + source = "registry+https://github.com/rust-lang/crates.io-index" 2982 + checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" 2983 + 2984 + [[package]] 2985 + name = "yaml-rust" 2986 + version = "0.4.5" 2987 + source = "registry+https://github.com/rust-lang/crates.io-index" 2988 + checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" 2989 + dependencies = [ 2990 + "linked-hash-map", 2991 + ] 2606 2992 2607 2993 [[package]] 2608 2994 name = "yoke"
+2 -2
Cargo.toml
··· 36 36 # URL Standard 37 37 url = "2.3.1" 38 38 39 - # HTML Encoding 40 - html-escape = "0.2.13" 39 + # Markdown Encoding 40 + comrak = "0.26.0" 41 41 42 42 [build-dependencies] 43 43 # Compile-time Environment Variables
+7 -2
src/html.rs
··· 9 9 )) 10 10 } 11 11 12 + fn safe(text: &str) -> String { 13 + comrak::markdown_to_html(text, &comrak::ComrakOptions::default()) 14 + .replace("<p>", "") 15 + .replace("</p>", "") 16 + } 17 + 12 18 #[allow(clippy::too_many_lines, clippy::cognitive_complexity)] 13 19 pub fn from_gemini( 14 20 response: &germ::request::Response, ··· 21 27 let ast = ast_tree.inner(); 22 28 let mut html = String::new(); 23 29 let mut title = String::new(); 24 - let safe = html_escape::encode_text; 25 30 let mut previous_link = false; 26 31 let condense_links = { 27 32 let links = var("CONDENSE_LINKS").map_or_else( ··· 208 213 "<ul>{}</ul>", 209 214 items 210 215 .iter() 211 - .map(|i| format!("<li>{i}</li>")) 216 + .map(|i| format!("<li>{}</li>", safe(i))) 212 217 .collect::<Vec<String>>() 213 218 .join("\n") 214 219 )),