GithubHelp home page GithubHelp logo

Comments (6)

willbeaufoy avatar willbeaufoy commented on May 22, 2024

I found a solution to this. See the answer here:

http://www.sublimetext.com/forum/viewtopic.php?f=3&t=8957

For this package the relevant line is from 1850 in Markdown Extended.tmLanguage

You'll need to override the file, see 'Overriding files from a zipped package' here: http://www.sublimetext.com/docs/3/packages.html

from sublime-markdown-extended.

jonschlinkert avatar jonschlinkert commented on May 22, 2024

@willbeaufoy you were able to fix this? want to do a pr? :-)

from sublime-markdown-extended.

willbeaufoy avatar willbeaufoy commented on May 22, 2024

Yes thanks, will do in the next few days.

from sublime-markdown-extended.

willbeaufoy avatar willbeaufoy commented on May 22, 2024

Hhm I made a pull request but withdrew it as the fix actually removes all highlighting behaviour from underscores even if they're not prececeded by a word. This is fine for me but isn't ideal for those who use this as emphasis.

Anyone see a way to preserve the proper behaviour? My change is in my branch:

https://github.com/willbeaufoy/sublime-markdown-extended/tree/fix-underscore-highlighting

from sublime-markdown-extended.

willbeaufoy avatar willbeaufoy commented on May 22, 2024

Ah some progress (code taken from the Markdown Editing package), using a negative lookbehind preserves proper markdown italic behaviour from underscores, the line now becomes:

(?<!\w)(\*|_)(?=\S)

as opposed to the original:

(\*|_)(?=\S)

and my first fix:

(\W)(\*|_)(?=\S)

It still doesn't support code like $_variable_name or _variable_name though so I'm still looking for a solution to this.

from sublime-markdown-extended.

pradyunsg avatar pradyunsg commented on May 22, 2024

Bump. Any fixes?

from sublime-markdown-extended.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.