GithubHelp home page GithubHelp logo

Comments (6)

tpoisot avatar tpoisot commented on July 4, 2024 1

I'd like to revive this issue -- right now, I am writing the package of a manual using the #' syntax and it's OK, but not ideal because a lot of formatting is lost.
I was not aware of #== -- is it rendered as markdown when calling weave?
I'd be happy to work on a PR for this.

from language-weave.

mpastell avatar mpastell commented on July 4, 2024

I'm not sure how it could be done. Let me know if you know of an Atom-package that does something similar and I can look into the code.

from language-weave.

gabrielgellner avatar gabrielgellner commented on July 4, 2024

Could it be similar to how Markdown uses code fences to change the highlighting grammar? You would do some kind of match on the starts with #' and then change the grammar to markdown?
Maybe a region is needed .. in which case would it then be maybe possible to do a match on something like #=' so it would kind of work like inverse Weave mode ... you would do fences for the markdown documentation, with the default mode being julia.

I say this just because I like to have my scripts be valid julia so I don't need to weave at computers without latex/pandoc ... but maybe this is beyond the scope of this package.

A similar issue is:
zargony/atom-language-rust#36

which argues for looking at how html code highlights css and javascript.

Though I really have not idea how atom does its highlighting! Thanks for even considering it!

from language-weave.

mpastell avatar mpastell commented on July 4, 2024

Sorry for the delay in my reply.

The problem is that if you change grammar of comment lines to markdown they all get highlighted as markdown headers (they start with #).

Anyway I will keep this in mind if I find some free time.

from language-weave.

gabrielgellner avatar gabrielgellner commented on July 4, 2024

That makes sense. I have moved to using #== , ==# blocks to enclose markdown. I have been trying to figure out how to change the grammar to just do the embedded highlighting for blocks of that form.

from language-weave.

mpastell avatar mpastell commented on July 4, 2024

It is currently not rendered as markdown, it would be great if you can contribute a PR. You just need to implement a new reader for the format and come up with a syntax for chunk options

from language-weave.

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.