blob: fab429f9104974c59434b697f2b93c0b1922913c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
from .base import BaseRenderer
class MarkdownRenderer(BaseRenderer):
def render(self, data):
"""
Renders the given data in Markdown format.
Args:
data (dict): The data to render.
Returns:
str: The rendered Markdown string.
"""
markdown_output = ""
for key, value in data.items():
markdown_output += f"## {key}\n\n{value}\n\n"
return markdown_output
def set_style(self, style):
"""
Sets the style for the Markdown renderer.
Args:
style (dict): A dictionary of style options.
"""
self.style = style # Currently, Markdown does not support styling, but this can be extended.
|