renderStyle function
- @Deprecated('Use markdownToAnsi with GlamourTheme.toAnsiRendererOptions() instead')
- String markdown, {
- required GlamourTheme theme,
- int width = 80,
Renders markdown text using the specified theme.
If width is provided, text will be wrapped to that width.
Defaults to 80 columns.
This function is deprecated. Use markdownToAnsi with
GlamourTheme.toAnsiRendererOptions() instead.
Implementation
@Deprecated(
'Use markdownToAnsi with GlamourTheme.toAnsiRendererOptions() instead',
)
String renderStyle(
String markdown, {
required GlamourTheme theme,
int width = 80,
}) {
final nodes = markdown_backend.parseMarkdownNodes(markdown);
final renderer = GlamourRenderer(theme: theme, width: width);
return renderer.render(nodes);
}