When migrating to ^5.0.4, users that don't have a codeTheme defined in addParameters will cease to have syntax highlighting since the fallback was the 'github' theme. It was removed at this line:
https://github.com/tuchk4/storybook-readme/commit/176242837437750e565300fd131cbe6fe9f8697e#diff-9d34cd04c930175e76f630ee5c964ea4L76
I think it would be nice to keep the default codeTheme as 'github'. If there was a reason why that was removed, it would be nice to specify that a theme must be configured when using this addon.
I agree too.
I guess this change should not at patch-version-up even if do this.
Because this is breaking change. so surprised for me why change display suddenly.
@lychyi @usagi-f Yeah you guys are right. I'll make a PR that fixes this issue by setting default github theme. Thanks for the investigation on the code level!
btw, tuchk4(Maintainer) is on a vacation, so please wait until he releases the fixed version
@lychyi @usagi-f I've merged the PR. If you guys had a time, please retry it(It is not released yet)
@lonyele It looks like it only fixes it for the new API. We're on the old API style so I got to catch that in some testing. I opened up #191 which fixes it on my end for both use cases. I not 100% familiar with the codebase so hopefully there aren't any errant side-effects doing it this way.
yep looks good
Most helpful comment
@lychyi @usagi-f Yeah you guys are right. I'll make a PR that fixes this issue by setting default
githubtheme. Thanks for the investigation on the code level!btw, tuchk4(Maintainer) is on a vacation, so please wait until he releases the fixed version