react-diff-view icon indicating copy to clipboard operation
react-diff-view copied to clipboard

highlight 不生效

Open lunalusy opened this issue 6 years ago • 0 comments

const tokens = useMemo(() => { if (!hunks) { return undefined; } const codeType = refractor.registered(language) ? language : 'json'; const options = { highlight: true, oldSource, language: codeType, refractor, }; return tokenize(hunksWithSourceExpanded, options); }, [hunks, hunksWithSourceExpanded, language, oldSource]); 这样写的token,看dom上有classname token,但是没有任何classname 是token的样式,请问还需要手动加载什么样式文化吗

lunalusy avatar May 21 '20 06:05 lunalusy