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

Extra newlines before quotes that start with code blocks #257

Closed
tocic opened this issue Jul 28, 2024 · 2 comments · Fixed by knatten/cppquiz#346
Closed

Extra newlines before quotes that start with code blocks #257

tocic opened this issue Jul 28, 2024 · 2 comments · Fixed by knatten/cppquiz#346

Comments

@tocic
Copy link
Collaborator

tocic commented Jul 28, 2024

I was testing the formatting on a local server and found the following strange behaviour:

image

This extra newline is added in cases when we start a quote with a 5-spaced code block (e.g., 284, 297, 339). There's no such problem if the code block is in the middle of a quote (e.g., 323).

If we try to use backticks, e.g.

> ```
> R future::get();
> R& future<R&>::get();
> void future<void>::get();
> ```

, then there's no newline but the code is not highlighted. It's displayed as a set of individual lines, not a code block:

image

@tocic
Copy link
Collaborator Author

tocic commented Jul 28, 2024

Looks like backticked code blocks are not rendered correctly everywhere, not only in quotes 😢:

image

We should either fix this problem or replace all the occurrences with 4-spaced code blocks.

@knatten
Copy link
Owner

knatten commented Jul 29, 2024

I agree! I've created knatten/cppquiz#345 for this. I think we should look into that before continuing the porting, instead of going over all the questions again and switching to indentation.

knatten added a commit to knatten/cppquiz that referenced this issue Jul 30, 2024
We want newlines to be treated as hard breaks; like StackOverflow and
GitHub flavored Markdown do. Previously this was done with a custom
hack, let's use an officially supported extension to our markdown
renderer instead.

Fixes knatten/cppquiz23#257 and helps with #345
knatten added a commit to knatten/cppquiz that referenced this issue Jul 30, 2024
We want newlines to be treated as hard breaks; like StackOverflow and
GitHub flavored Markdown do. Previously this was done with a custom
hack, let's use an officially supported extension to our markdown
renderer instead.

Fixes knatten/cppquiz23#257
Fixes #343
Helps with #345
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 a pull request may close this issue.

2 participants