From 2e95fab9dfa458392755d80ec32f7f778d8937bd Mon Sep 17 00:00:00 2001 From: supertiger1234 Date: Tue, 29 Oct 2019 20:03:54 +0000 Subject: [PATCH] removed unused code --- src/utils/simpleMarkdownRules/CustomEmoji.js | 29 -------------------- src/utils/simpleMarkdownRules/linkify.js | 29 -------------------- 2 files changed, 58 deletions(-) delete mode 100644 src/utils/simpleMarkdownRules/CustomEmoji.js delete mode 100644 src/utils/simpleMarkdownRules/linkify.js diff --git a/src/utils/simpleMarkdownRules/CustomEmoji.js b/src/utils/simpleMarkdownRules/CustomEmoji.js deleted file mode 100644 index 201ee38..0000000 --- a/src/utils/simpleMarkdownRules/CustomEmoji.js +++ /dev/null @@ -1,29 +0,0 @@ -import SimpleMarkdown from 'simple-markdown'; - -export default { - // Specify the order in which this rule is to be run - // This rule doesn't conflict with much else, so it should be fine to just put it before the - // general-case text rule: - order: SimpleMarkdown.defaultRules.text.order - 0.5, - - // First we check whether a string matches - match: function(source) { - // // || followed by any character repeated [\s\S]+? followed by || - // // Also see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions for more info on regexes - return /^\<\:([\S]+?)\:([\S]+?)>/.exec(source); - }, - - // Then parse this string into a syntax node - parse: function(capture, parse, state) { - return { - // capture[1] is the parenthesis group from the regex in `match`: - name: parse(capture[1], state), - id: parse(capture[2], state) - }; - }, - - // Finally transform this syntax node into an html element: - html: function(node, output, state) { - return '' + output(node.name, state)  + '' - } -} \ No newline at end of file diff --git a/src/utils/simpleMarkdownRules/linkify.js b/src/utils/simpleMarkdownRules/linkify.js deleted file mode 100644 index 2349cb8..0000000 --- a/src/utils/simpleMarkdownRules/linkify.js +++ /dev/null @@ -1,29 +0,0 @@ -import SimpleMarkdown from 'simple-markdown'; -import linkify from 'linkify-it' -const linkifyInstance = linkify(); - - -export default { - // Specify the order in which this rule is to be run - // This rule doesn't conflict with much else, so it should be fine to just put it before the - // general-case text rule: - order: SimpleMarkdown.defaultRules.link - 0.5, - - // First we check whether a string matches - match: function(source) { - return linkifyInstance.match(source) - }, - - // Then parse this string into a syntax node - parse: function(capture, parse, state) { - console.log(capture) - return { - content: parse(capture[0], state), - }; - }, - - // Finally transform this syntax node into an html element: - html: function(node, output, state) { - return 'owo' - } -} \ No newline at end of file