damiankorcz / Prism-Theme

A Comprehensive, Highly-Customisable and Elegant Light/Dark Theme for Obsidian.md
https://www.buymeacoffee.com/DamianKorcz
MIT License
394 stars 13 forks source link

[Bug][Code block] Some texts are hard to read in live view #77

Closed tensorcopy closed 1 year ago

tensorcopy commented 2 years ago

Python code block

def romanToInt(self, s: str) -> int:
    res, prev = 0, 0
    dict = {'I':1, 'V':5, 'X':10, 'L':50, 'C':100, 'D':500, 'M':1000}
    for i in s[::-1]:          # rev the s
        if dict[i] >= prev:
            res += dict[i]     # sum the value iff previous value same or more
        else:
            res -= dict[i]     # substract when value is like "IV" --> 5-1, "IX" --> 10 -1 etc 
        prev = dict[i]
    return res

Live view

image

Reading view

image
damiankorcz commented 1 year ago

Hi @np-22, Syntax Highlighting and Colours have been redone in the latest 3.0.0 update which should address this issue.