Skip to content

Commit

Permalink
Delete Templating Methods from editor.js - Solving Issue #9919 (#9923)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayeritz authored Jul 26, 2021
1 parent b73594f commit a1af60d
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions app/assets/javascripts/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class Editor {
this.commentFormID = defaultForm;
this.isSingleFormPage = isSingleFormPage;
// this will get deleted in the next few PRs, so collapsing into one line to pass codeclimate
this.templates = { 'blog': "## The beginning\n\n## What we did\n\n## Why it matters\n\n## How can you help", 'default': "## What I want to do\n\n## My attempt and results\n\n## Questions and next steps\n\n## Why I'm interested", 'support': "## Details about the problem\n\n## A photo or screenshot of the setup", 'event': "## Event details\n\nWhen, where, what\n\n## Background\n\nWho, why", 'question': "## What I want to do or know\n\n## Background story" };

marked.setOptions({
gfm: true,
Expand Down Expand Up @@ -81,29 +80,10 @@ class Editor {
'](' + src + ')\n'
);
}
// these header formatting functions are not used anywhere, so commenting them out for now to pass codeclimate:

// h1() {
// this.wrap('#','')
// }

h2() {
this.wrap('##', '');
}
// h3() {
// this.wrap('###','')
// }
// h4() {
// this.wrap('####','')
// }
// h5() {
// this.wrap('#####','')
// }
// h6() {
// this.wrap('######','')
// }
// h7() {
// this.wrap('#######','')
// }

//debounce function addition
debounce(func, wait, immediate) {
Expand Down

0 comments on commit a1af60d

Please sign in to comment.