Comments (6)
I can't find an official description but the original intent was to provide this additional feature that GitHub Flavoured Markdown provides:
Escape Underscores in Words
It is not reasonable to italicize just part of a word, therefore words containing multiple underscores have their inner underscores escaped. This foo_bar_baz does not turn into foobarbaz.
from github-markdown.tmbundle.
Makes sense. But it seems that TextMate's own Markdown grammar already handles this (see second screenshot)?
from github-markdown.tmbundle.
@noniq Yes, you are correct. 👍 to tearing out the new buggy, italic stuff from me.
from github-markdown.tmbundle.
Hm okay, not sure what exactly I did wrong, but TextMate’s own Markdown grammar does indeed italicize part of words. So it is still necessary to somehow override this feature in this bundle.
I’m right now experimenting a bit, the following seems to work fine:
I simplified the look-behind pattern to make sure the rule also matches the first underscore in a word. I also changed the injection selector to (L:text.html.markdown)
(removing the markup.italic.markdown
part). Finally, I changed name to markup.other
to prevent the matched underscores from getting italicized (which does not make a different in any font I know of, but who knows …)
I’ve checked with a few Markdown documents, and they all seem to be highlighted correctly. But I’m totally sure that there could be some edge cases where something breaks. Any ideas what else to check or improve?
from github-markdown.tmbundle.
I’ve checked with a few Markdown documents, and they all seem to be highlighted correctly. But I’m totally sure that there could be some edge cases where something breaks. Any ideas what else to check or improve?
Seems great to me; definitely better than what's there currently!
from github-markdown.tmbundle.
I merged this for now. I’ll keep an eye on it and refine if necessary.
from github-markdown.tmbundle.
Related Issues (15)
- Code Blocks not Matching Correctly
- Markdown (Github) not showing up in Syntax list HOT 1
- Convert to HTML fail when header is only CJK characters HOT 3
- Cannot generate preview with RVM HOT 3
- Background Color for Inline and Code Blocks Theme Specific
- Manual Installation in TextMate2 HOT 3
- Not working for me HOT 2
- math inside HOT 1
- Preview has trouble with fenced code HOT 3
- Avoid code symbols showing up in "Jump to Symbols" HuD HOT 1
- Some of the C syntax isn't picked up within code fences HOT 2
- Add xml code block support
- Feature: syntax highlight code fences HOT 4
- Configure the font HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-markdown.tmbundle.