rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.3k stars 732 forks source link

JSX omits inline React Native style #1909

Closed dcangulo closed 1 year ago

dcangulo commented 1 year ago

Name of the lexer

Sample Code

import React from 'react';
import { View, Text } from 'react-native';

export default function Component() {
  return (
    <View style={{ flex: 1, justifyContent: 'center' }}>
      <Text style={{ color: 'blue' }}>
        Hello World!
      </Text>
    </View>
  );
}

Actual Result

Screenshot 2022-12-25 at 22 36 48

rouge.jneen.net

rouge.jneen.net is currently down.

Screenshot 2022-12-25 at 22 34 36
dcangulo commented 1 year ago

On second thought, I noticed that this is not a library problem but Jekyll recognizes {{ }} as liquid.

I just have to do wrap my code with {%raw%} {%endraw%}.