How to use html-to-md - 1 common examples

To help you get started, we’ve selected a few html-to-md 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 znck / grammarly / src / server.ts View on Github external
alert => alert.highlightBegin <= offset && offset <= alert.highlightEnd
    )

    if (!alerts.length) return

    alerts.sort((a, b) => a.highlightEnd - a.highlightBegin - (b.highlightEnd - b.highlightBegin))

    const alert = alerts[0]

    const hover: Hover = {
      range: getRangeInDocument(document, alert.highlightBegin, alert.highlightEnd),
      contents: {
        kind: 'markdown',
        value:
          alert.explanation || alert.details || alert.examples
            ? toMarkdown(`${alert.explanation || ''} ${alert.details || ''} ${alert.examples || ''}`)
            : '',
      },
    }

    return hover
  })
)

html-to-md

A JS library for convert HTML<String> to markdown<String>, gzip 10kb

MIT
Latest version published 4 months ago

Package Health Score

62 / 100
Full package analysis

Popular html-to-md functions