How to use the remark/package.json.homepage function in remark

To help you get started, we’ve selected a few remark examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fkling / astexplorer / website / src / parsers / markdown / remark.js View on Github external
import React from 'react';
import defaultParserInterface from '../utils/defaultParserInterface';
import pkg from 'remark/package.json';

const ID = 'remark';

export default {
  ...defaultParserInterface,

  id: ID,
  displayName: ID,
  version: pkg.version,
  homepage: pkg.homepage,
  locationProps: new Set(['position']),

  loadParser(callback) {
    require(['remark'], callback);
  },

  parse(remark, code, options) {
    return remark()
      .data('settings', options)
      .parse(code);
  },

  nodeToRange({position}) {
    if (position) {
      return [position.start.offset, position.end.offset];
    }

remark

markdown processor powered by plugins part of the unified collective

MIT
Latest version published 1 year ago

Package Health Score

79 / 100
Full package analysis