aboutsummaryrefslogtreecommitdiff
path: root/parse_wiki_text/src/default.rs
diff options
context:
space:
mode:
authorJJ2023-01-04 23:57:41 +0000
committerJJ2023-01-04 23:57:48 +0000
commita2e04ff18ad27be4dc1c66079941baaec79e003f (patch)
tree256201497d3c3ef3dba9031ee985d407b80b95a6 /parse_wiki_text/src/default.rs
parentbaf2f93b3002c2a0769bbd53f37d845c7717d95b (diff)
Copy the last version of the parse_wiki_text crate in for development
Diffstat (limited to 'parse_wiki_text/src/default.rs')
-rw-r--r--parse_wiki_text/src/default.rs88
1 files changed, 88 insertions, 0 deletions
diff --git a/parse_wiki_text/src/default.rs b/parse_wiki_text/src/default.rs
new file mode 100644
index 0000000..50110e4
--- /dev/null
+++ b/parse_wiki_text/src/default.rs
@@ -0,0 +1,88 @@
+// Copyright 2019 Fredrik Portström <https://portstrom.com>
+// This is free software distributed under the terms specified in
+// the file LICENSE at the top-level directory of this distribution.
+
+pub fn create_configuration() -> crate::Configuration {
+ crate::Configuration::new(&crate::ConfigurationSource {
+ category_namespaces: &["category"],
+ extension_tags: &[
+ "categorytree",
+ "ce",
+ "charinsert",
+ "chem",
+ "gallery",
+ "graph",
+ "hiero",
+ "imagemap",
+ "indicator",
+ "inputbox",
+ "mapframe",
+ "maplink",
+ "math",
+ "nowiki",
+ "poem",
+ "pre",
+ "ref",
+ "references",
+ "score",
+ "section",
+ "source",
+ "syntaxhighlight",
+ "templatedata",
+ "timeline",
+ ],
+ file_namespaces: &["file", "image"],
+ link_trail: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
+ magic_words: &[
+ "DISAMBIG",
+ "FORCETOC",
+ "HIDDENCAT",
+ "INDEX",
+ "NEWSECTIONLINK",
+ "NOCC",
+ "NOCOLLABORATIONHUBTOC",
+ "NOCONTENTCONVERT",
+ "NOEDITSECTION",
+ "NOGALLERY",
+ "NOGLOBAL",
+ "NOINDEX",
+ "NONEWSECTIONLINK",
+ "NOTC",
+ "NOTITLECONVERT",
+ "NOTOC",
+ "STATICREDIRECT",
+ "TOC",
+ ],
+ protocols: &[
+ "//",
+ "bitcoin:",
+ "ftp://",
+ "ftps://",
+ "geo:",
+ "git://",
+ "gopher://",
+ "http://",
+ "https://",
+ "irc://",
+ "ircs://",
+ "magnet:",
+ "mailto:",
+ "mms://",
+ "news:",
+ "nntp://",
+ "redis://",
+ "sftp://",
+ "sip:",
+ "sips:",
+ "sms:",
+ "ssh://",
+ "svn://",
+ "tel:",
+ "telnet://",
+ "urn:",
+ "worldwind://",
+ "xmpp:",
+ ],
+ redirect_magic_words: &["REDIRECT"],
+ })
+}