hightlight=true,css in js 解析问题
const options = { highlight: true, oldSource, language: codeType, refractor, enhancers: [markEdits(hunksWithSourceExpanded, { type: 'line' })], }; const tokenizedResult = tokenize(hunksWithSourceExpanded, options); 这样的写法,使用styled-component定义的样式解析出来不对 ${hiDPI(1.5)} { CSS_1 } CSS_2 { CSS_3 } CSS_4 { CSS_5 } CSS_6 { CSS_7
highlight=false,解析就是正确的,但是没有高亮
${hiDPI(1.5)} {
${content(.75, 1.5)} ${hiDPI(2)} { ${content(.5, 2)} ${hiDPI(2.75)} { ${content(.36363636, 2.75)} ${hiDPI(3)} { ${content(.33333333, 3)} }
请问是我哪里写法有问题嘛,还有,语法高亮是需要手动引入语法高亮样式库嘛? 发现手动import 'prismjs/themes/prism-coy.css';,hightlight=true是有语法高亮的
const options = { highlight: true, oldSource, language: codeType, // refractor, enhancers: [markEdits(hunksWithSourceExpanded, { type: 'line' })], }; 如果不引入refractor,会报 Cannot read property 'highlight' of undefined的错
@dancerphil 这个事情是不是refractor的BUG?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.