max-programming / easypastes

Use Easy Pastes to create, store, share code snippets by simply pasting them with syntax highlight.
https://easypastes.tk
MIT License
38 stars 9 forks source link

Some Characters are not displayed as it was when pasted #6

Open aditya-mitra opened 2 years ago

aditya-mitra commented 2 years ago

Describe the bug

Some characters like the >= and the != are displayed in some other format. When I share these pastes to other people, they find it difficult to decipher these characters.

image

image

To Reproduce

  1. paste the code below
  2. submit in easypastes

 while(start < end){
            if(str[start++] != str[end--]){
                return false;
            }
        }
        return true;
    }

    void backtrack(vector<string> &curr, const int start){
        if(start >= str.length()){
            ans.push_back(curr);
        }

Expected behavior

The != character should be displayed just like the != character.

Screenshots If applicable, add screenshots to help explain your problem.

image

https://www.easypastes.tk/pastes/2z4pV5

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

janaSunrise commented 2 years ago

This is intended behaviour. We use Fira code font for the ligatures. If you're not sure about what ligatures are, Check this out.

It will be copied as normal text, for example if you copy not equal to symbol, It is copied as != regardless of the unicode ligature display.

Hope this helps you! 😁

aditya-mitra commented 2 years ago

@janaSunrise Can you put some setting for a particular account so that this setting can be turned off for that account only? The problem is some people misunderstand the character as some other literal in the language. Thanks.

janaSunrise commented 2 years ago

We'll look into this issue, once we get the time! Since this is more of a feature addition.

max-programming commented 2 years ago

Yes we'll add an option for disabling font ligatures. Thanks for creating the issue @aditya-mitra

janaSunrise commented 2 years ago

@max-programming We could add a toggle button to enable or disable ligatures, Connected to DB. Just like how we have for other options. More about that later, Adding this PR to the TODO list, will be worked on when we are done with the list, as we are going through each feature one by one.

Making it a toggle button based config on a paste basis, could enable user to customize each paste how they want. It would make it easier in my opinion too. We will work on this once we tackle the other features one by one. Hope you understand! 😁

max-programming commented 2 years ago

@max-programming We could add a toggle button to enable or disable ligatures, Connected to DB. Just like how we have for other options. More about that later, Adding this PR to the TODO list, will be worked on when we are done with the list, as we are going through each feature one by one.

Making it a toggle button based config on a paste basis, could enable user to customize each paste how they want. It would make it easier in my opinion too. We will work on this once we tackle the other features one by one. Hope you understand! 😁

Yes. Or we could create a modal for additional settings where we could add this and many other settings