const TurndownService = require('turndown');
const turndownService = new TurndownService();

/**
 * Coverts html to markdown. We need this in comment blocks that have been processed by the 'Marked' plugin.
 * @param options
 */
export function getMarkdownFromHtml(options: any) {
  return turndownService.turndown(options.fn(this));
}

const TurndownService = require('turndown');
const turndownService = new TurndownService();

/**
 * Coverts html to markdown. We need this in comment blocks that have been processed by the 'Marked' plugin.
 * @param options
 */
export function getMarkdownFromHtml(options: any) {
  return turndownService.turndown(options.fn(this), {
    codeBlockStyle: 'fenced'
  });
}

Make turndown default to using fenced code blocks
Make turndown default to using fenced code blocks