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

specify starting line number in enhanced code block #173

Closed
eecs441staff opened this issue Apr 16, 2022 · 2 comments
Closed

specify starting line number in enhanced code block #173

eecs441staff opened this issue Apr 16, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@eecs441staff
Copy link

Is your feature request related to a problem? Please describe.
When the narrative breaks up a block of code into multiple code blocks, it would be useful to start subsequent code blocks' line number not at 1.

Describe the solution you'd like
To specify a starting line number with each enhanced code block:
{: data-variant="enhanced" start-at="21" }

Describe alternatives you've considered
Could be:
{: line-number-start-at="21" }
but prefer shorter variable name.

@eecs441staff eecs441staff added the enhancement New feature or request label Apr 16, 2022
@eecs441staff
Copy link
Author

On second thought, it's very hard to keep the starting line numbers synch with the actual code. Students may find it confusing when the line numbers don't match up. So I'm withdrawing this suggestion.

@seshrs
Copy link
Member

seshrs commented Apr 16, 2022

it's very hard to keep the starting line numbers synch with the actual code

I was wondering the same thing! It's actually quite easy for me to implement, but like you said, I feel like it might be hard for spec authors to maintain.

I personally think of line numbers in code blocks as a way to reference them (for instance, a student on Piazza might say, "I don't understand why we need to do X on line 7"). That said, I can also imagine it's confusing when the code is a subset of an actual starter file.

I guess like you mentioned in previous feedback, this is a good use-case for the data-variant="no-line-numbers" (#165).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants