diff options
author | JJ | 2023-01-04 23:57:41 +0000 |
---|---|---|
committer | JJ | 2023-01-04 23:57:48 +0000 |
commit | a2e04ff18ad27be4dc1c66079941baaec79e003f (patch) | |
tree | 256201497d3c3ef3dba9031ee985d407b80b95a6 /parse_wiki_text/src/default.rs | |
parent | baf2f93b3002c2a0769bbd53f37d845c7717d95b (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.rs | 88 |
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"], + }) +} |