aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/conventionalrp/renderers/markdown_renderer.py
blob: 396d6a4637cd55c44d0e5b5411a9b33cc1b1a577 (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
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.