Code Monkey home page Code Monkey logo

Comments (8)

patrickdavey avatar patrickdavey commented on May 16, 2024

Looks like the dependency we use -> https://github.com/rouge-ruby/rouge has some options for :dark handling. It'd require a config option etc. to be passed in.

Do you want to give this a go as a PR (especially if you're a ruby dev!)? If not I'll try make time for having a play with it in the next week or so :)

from vimwiki_markdown.

mattyrc avatar mattyrc commented on May 16, 2024

Thanks for the quick response! Unfortunately I don't know very much about ruby development at all or else I'd give this a try.

from vimwiki_markdown.

patrickdavey avatar patrickdavey commented on May 16, 2024

I have added support for dark mode.

Change your template to have %dark_pygments% instead of just %pygments% and it should work. You'll need to upgrade to the latest gem 0.9.0

Let me know how you get on @mattyrc

from vimwiki_markdown.

mattyrc avatar mattyrc commented on May 16, 2024

@patrickdavey

It's working great! Thank you very much for adding this so quickly.

It took me a minute to realize that both %pygments% and %dark_pygments% need to be present in the template file.

Cheers!

from vimwiki_markdown.

patrickdavey avatar patrickdavey commented on May 16, 2024

It shouldn't require both? I just tested it out locally and it worked fine for me? What happens if you remove %pygments% and just leave %dark_pygments% ? in what way is it broken?

from vimwiki_markdown.

mattyrc avatar mattyrc commented on May 16, 2024

When %dark_pygments% only is in the template I am seeing no color in the fenced code block.

I double verified that I am using version 0.9.0 and tested in both Firefox and Chromium.

I've just tried editing the default.tpl from the example_files in three different way and this is what I'm seeing in the html:

%dark_pygments% Only:
darkpyg_only

%pygments% Only:
pyg_only

%pygments% and %dark_pygments%:
pyg_and_darkpyg

Markdown. Note I had to remove backticks in markdown because it would mess up GitHubs code block:

**Java Code**
java  
class test {  
  public static void main(String args[]) {
    System.out.println("Hi);  
  }  
}  
  
**Bash Code**  
sh
echo "Enter Your Name"
read name
echo "Welcome $name"

from vimwiki_markdown.

patrickdavey avatar patrickdavey commented on May 16, 2024

Doh! Thanks @mattyrc - I've pushed up 0.9.1 which should fix that issue. You should only need %dark_pygments% in there now! Thanks for letting me know :)

from vimwiki_markdown.

mattyrc avatar mattyrc commented on May 16, 2024

@patrickdavey I can confirm that it is working with only %dark_pygments% in version 0.9.1.

Thanks again!

from vimwiki_markdown.

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.