markdown-viewer
markdown-viewer copied to clipboard
Support upper case MD extension
trafficstars
The RE \.(?:markdown|mdown|mkdn|md|mkd|mdwn|mdtxt|mdtext|text)(?:#.*|\?.*)?$ does not support .MD. I modified it as follows and it worked:
\.(?:markdown|mdown|mkdn|md|MD|mkd|mdwn|mdtxt|mdtext|text)(?:#.*|\?.*)?$
That's a good point. I wonder what is the performance difference between case sensitive and case insensitive regex in this case. I might have to make a few tests.
I don't know. An alternative is to copy the string and convert to lower case--for comparison purposes only.