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

Support hidden lines in languages other than Rust #1761

Closed
wants to merge 1 commit into from

Conversation

jannik4
Copy link
Contributor

@jannik4 jannik4 commented Mar 4, 2022

This is based on the work in #1339 by @thecodewarrior adapting the proposal by @dtolnay.

Changes:

  • Moved the hidelines settings from output.html.playground to output.html.code, because it has nothing to do with the rust playground, but applies to all code blocks.

Example

# book.toml

[output.html.code.hidelines]
python = "~"
# using global settings

```python
~hidden()
nothidden():
~    hidden()
    ~hidden()
    nothidden()
```
# using local override

```python,hidelines=!!!
!!!hidden()
nothidden():
!!!    hidden()
    !!!hidden()
    nothidden()
```

(Since the changes (especially the examples in the mdbook) are based on your work @thecodewarrior I would like to add you as co-author if you want.)

@thecodewarrior
Copy link
Contributor

This looks great! I don't know how co-authorship works, but that sounds good to me :D

@TheZoq2
Copy link

TheZoq2 commented Apr 11, 2023

Sorry to leave a "any updates on this comment", but this would be very useful to me. Is there anything holding it back from being merged (once the new merge conflicts have been resolved)? Could I do anything to help?

@ehuss
Copy link
Contributor

ehuss commented May 28, 2023

Thanks, I wanted to make a few small changes, but I couldn't push to the branch here, so I opened a new PR at #2093 to merge this.

@ehuss ehuss closed this May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants