Open sharan21 opened 5 months ago
I am using the same CodeWrapper defined in the demo doc along with PreConfig to configure light and dark colors to be used.
Column( crossAxisAlignment: CrossAxisAlignment.start, children: MarkdownGenerator().buildWidgets( config: MarkdownConfig.defaultConfig.copy( configs: [ const PreConfig().copy( wrapper: codeWrapper, textStyle: const TextStyle(fontFamily: 'RobotoMono'), decoration: BoxDecoration( color: isDark ? const Color.fromARGB(255, 29, 29, 29) : Colors.white, borderRadius: const BorderRadius.all(Radius.circular(8.0)), ), ), ], ), message.message, ), ),
This is only being applied to block code that is surrounded by triple back ticks like
this
But this wrapper is not being applied for inline code that is surround by single backticks i.e. like this
Below is an example of how the dark colors are getting applied for the code block but not the inline code.
How do I make the wrapper also apply for inline code? TIA
Hi @sharan21 , you need use CodeConfig to customize the inline code
CodeConfig
Hey @asjqkkkk thanks for the reply. Can you please give an example on how this can be done?
I am using the same CodeWrapper defined in the demo doc along with PreConfig to configure light and dark colors to be used.
This is only being applied to block code that is surrounded by triple back ticks like
But this wrapper is not being applied for inline code that is surround by single backticks i.e. like
this
Below is an example of how the dark colors are getting applied for the code block but not the inline code.
How do I make the wrapper also apply for inline code? TIA