How to use the dedent-tabs function in dedent-tabs

To help you get started, we’ve selected a few dedent-tabs 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 pocka / storybook-addon-vue-info / src / extract / index.ts View on Github external
})

  // Set up markdown renderer for summary
  const renderer = new marked.Renderer()

  renderer.code = (code, lang) =>
    `<pre><code class="hljs">${
      hljs.highlightAuto(code, lang ? [lang] : undefined).value
    }</code></pre>`

  marked.setOptions({ renderer })

  return {
    title: kindName,
    subtitle: storyName,
    summary: marked(dedent(options.summary)),
    storySource: dedent(
      story.template || getJSXFromRenderFn(story.render! as any)
    ),
    jsxStory: !!story.render,
    components
  }
}
github pocka / storybook-addon-vue-info / src / extract / index.ts View on Github external
// Set up markdown renderer for summary
  const renderer = new marked.Renderer()

  renderer.code = (code, lang) =&gt;
    `<pre><code class="hljs">${
      hljs.highlightAuto(code, lang ? [lang] : undefined).value
    }</code></pre>`

  marked.setOptions({ renderer })

  return {
    title: kindName,
    subtitle: storyName,
    summary: marked(dedent(options.summary)),
    storySource: dedent(
      story.template || getJSXFromRenderFn(story.render! as any)
    ),
    jsxStory: !!story.render,
    components
  }
}
github pocka / storybook-addon-vue-info / src / utils / getTagNames.ts View on Github external
export const fromTemplate = (template: string): string[] => {
  const { ast } = compile(dedent(template))

  if (!ast) {
    return []
  }

  return removeDuplicates(retrieveTagNamesFromAST(ast))
}

dedent-tabs

An ES6 string tag that strips indentation from multi-line strings

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Popular dedent-tabs functions