Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code folding on source blocks #789

Open
noraj opened this issue Sep 18, 2023 · 0 comments
Open

Add code folding on source blocks #789

noraj opened this issue Sep 18, 2023 · 0 comments
Labels
💬 discussion Disccussion on new features, projects, etc... ✨ enhancement

Comments

@noraj
Copy link

noraj commented Sep 18, 2023

It would be nice to add code folding for source blocks. This way if you have something like:

[source, ruby]
----
# Output "I love Ruby"
say = "I love Ruby"
puts say

# Output "I *LOVE* RUBY"
say['love'] = "*love*"
puts say.upcase

# Output "I *love* Ruby"
# five times
5.times { puts say }
----

blabla

```ruby
# The famous Hello World
# Program is trivial in
# Ruby. Superfluous:
#
# * A "main" method
# * Newline
# * Semicolons
#
# Here is the Code:

puts "Hello World!"
```

You could fold it to:

[source, ruby]
----…

blabla

```ruby…

Note: dots are added by VSCode on folding

Documentation: https://docs.asciidoctor.org/asciidoc/latest/verbatim/source-blocks/

It would be very similar to #553

@noraj noraj added ✨ enhancement 💬 discussion Disccussion on new features, projects, etc... labels Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 discussion Disccussion on new features, projects, etc... ✨ enhancement
Projects
None yet
Development

No branches or pull requests

1 participant