Code Monkey home page Code Monkey logo

Comments (8)

tshort avatar tshort commented on May 24, 2024 3

How about including the multi-line comment field, too? It'd be even easier to include/format markdown there.

#=
# heading

Some *text*...
=#

Another option is to include something in the leading indicator like #=md.

from literate.jl.

fredrikekre avatar fredrikekre commented on May 24, 2024 1

How about including the multi-line comment field, too?

I am not a big fan of multiline comments personally, It breaks syntax highlighting in some editors, complicates the quite minimal current syntax, and makes parsing of the source file more complicated. I think going with #4 is good enough, which should make it much simpler to comment-toggle the markdown lines, if you prefer to edit them without the leading # , and then toggle back.

from literate.jl.

Datseris avatar Datseris commented on May 24, 2024

Sounds like a good plan!

from literate.jl.

KristofferC avatar KristofferC commented on May 24, 2024

Agree that #' is a bit annoying. I think the # and ## would probably work well.

from literate.jl.

piever avatar piever commented on May 24, 2024

I also think it'd be better! Writing markdown spanning multiple lines is probably much more common in these kind of files and it's good to be able to use the editor shortcut for that.

from literate.jl.

aalexandersson avatar aalexandersson commented on May 24, 2024

The user-written Stata command markstat uses the simple "one tab or four spaces" rule to distinguish Stata and Markdown which works well. Stata code blocks are defined similar to Github code blocks like this

```s
  // Stata code goes here
```

I prefer a similar solution where I would not have to type a character such as # to get Markdown in Julia. Perhaps like the Stata approach above but with j or instead of s as an optional language identifier for Julia.

Caveat (in case it is not obvious): I do not know Julia at all, just starting to learn as prep for Julia 1.0.

from literate.jl.

JeffreySarnoff avatar JeffreySarnoff commented on May 24, 2024

Multiline comments provided limited literacy before it was fashionable. I still use them when, six months hence, l need to remember a subtle something.
Would there be a way to adapt Julia's block delimiters and use ##= .. #=# without requiring mensurable effort.

Either way, I am appreciative of the work. Maybe now, I can provide the sort of microtutorial others will utilize. Thank you.

from literate.jl.

waldyrious avatar waldyrious commented on May 24, 2024

Related to @aalexandersson's point above, and just for reference (I'm not convinced this would be preferable to # v.s ##), back in 2013 I filled jashkenas/docco#216, which suggests omitting the space after the comment marker to distinguish intentional documentation from (temporarily?) commented-out code. Thought I'd mention that option here, for completeness.

from literate.jl.

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.