asjqkkkk / markdown_widget

📖Rendering markdown by flutter!Welcome for pr and issue.
MIT License
321 stars 93 forks source link

Line breaks not working? #164

Closed turbobuilt closed 7 months ago

turbobuilt commented 7 months ago
Screenshot 2024-03-10 at 2 25 09 PM
    var config = MarkdownConfig(configs: [
      const PreConfig(theme: a11yLightTheme),
    ]);
    return Container(
      padding: const EdgeInsets.all(8),
      child: MarkdownBlock(
        data: message['content'],
        config: config,
      ),
    );

I don't see why it doesn't look right. Why no line breaks?

Here's the source:

Sure, here is an example of a Python function that takes two numbers as input and returns their sum:

def add_numbers(a, b):
    return a + b

# Example usage
num1 = 5
num2 = 7
result = add_numbers(num1, num2)
print(result)  # Output: 12

This function add_numbers takes two parameters a and b, representing the two numbers to be added together. The return a + b statement calculates the sum of the two numbers and returns it. Finally, we call the function with num1 and num2 as arguments and print the result.

turbobuilt commented 7 months ago

Whoops, when I streamed them, they were actually removed from the source! Adding them back fixed it!