Skip to content

Update recipe for adding plugins #790

@Erin-Cecele

Description

@Erin-Cecele

Before proceeding, check to make sure there isn’t an existing issue for your suggestion or a similar one.

  • I have searched the existing issues and determined this is new suggestion.

Idea being proposed

Previously the top portion of the /_plugins/markdown/index.js file looked like this:

// Add Markdown plugins for super and subscript
// Lines added are 13, 14, 52, and 53

const MarkdownIt = require('markdown-it')
const anchorsPlugin = require('markdown-it-anchor')
const attributesPlugin = require('markdown-it-attrs')
const bracketedSpansPlugin = require('markdown-it-bracketed-spans')
const defaults = require('./defaults')
const deflistPlugin = require('markdown-it-deflist')
const footnotePlugin = require('markdown-it-footnote')
const { footnoteRef, footnoteTail } = require('./footnotes')
const removeMarkdown = require('remove-markdown')
const superscriptPlugin = require('markdown-it-sup')
const subscriptPlugin = require('markdown-it-sub')

However, due to recent updates, it must be formatted like this:

// Add Markdown plugins for super and subscript
// Lines added are 13, 14, 52, and 53

import { footnoteRef, footnoteTail } from './footnotes.js'
import MarkdownIt from 'markdown-it'
import anchorsPlugin from 'markdown-it-anchor'
import attributesPlugin from 'markdown-it-attrs'
import bracketedSpansPlugin from 'markdown-it-bracketed-spans'
import defaults from './defaults.js'
import deflistPlugin from 'markdown-it-deflist'
import footnotePlugin from 'markdown-it-footnote'
import removeMarkdown from 'remove-markdown'
import superscriptPlugin from 'markdown-it-sup'
import subscriptPlugin from 'markdown-it-sub'

This came to light in grj-21 and has been tested.

What contribution category does your proposal fall under?

Copyedit text

Supporting Information

No response

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions