mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Markdown: Replace rendering library (#17686)
* Replace remarkable with marked * Add wrapper and options for marked
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
// @ts-ignore
|
||||
import Remarkable from 'remarkable';
|
||||
import { renderMarkdown } from '@grafana/data';
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
|
||||
interface Props {
|
||||
@@ -39,8 +38,7 @@ export class PluginHelp extends PureComponent<Props, State> {
|
||||
getBackendSrv()
|
||||
.get(`/api/plugins/${plugin.id}/markdown/${type}`)
|
||||
.then((response: string) => {
|
||||
const markdown = new Remarkable();
|
||||
const helpHtml = markdown.render(response);
|
||||
const helpHtml = renderMarkdown(response);
|
||||
|
||||
if (response === '' && type === 'help') {
|
||||
this.setState({
|
||||
|
||||
Reference in New Issue
Block a user