question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Formatting problem in a code snippet

See original GitHub issue

📚 Docs or angular.io bug report

Description

The code snippet right at https://angular.io/guide/route-animations#querying-the-view-containers has problems with formatting (the topmost query() should be aligned).

May confuse the reader as to what is nested into what…

However — this snippet is the continuation of the code from https://angular.io/guide/route-animations#styling-the-host-and-child-components and notice that the transition('HomePage <=> AboutPage'... function call is torn between the two snippets, which makes it even less consistent and readable

May be more readable to reproduce the whole piece in the bottom snippet, that piece is long anyway. Or, title it as src/app/animations.ts (continued) at least

🔬 Minimal Reproduction

What’s the affected URL?**

https://angular.io/guide/route-animations#querying-the-view-containers

Reproduction Steps**

Expected vs Actual Behavior**

📷Screenshot

🔥 Exception or Error





🌍 Your Environment

Browser info

Anything else relevant?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sonukapoorcommented, Feb 3, 2020

@pasha-bolokhov / @kapunahelewong Unfortunately, our code-example component is not adhering to the indentation for a new section. It always aligns the code to the left. Therefore, I have simply added the Continuation from above into the code section header. I hope this clarifies that section a little bit better.

0reactions
angular-automatic-lock-bot[bot]commented, Mar 5, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pasting a code snippet inside ticks doesn't format as a code ...
Hi, In teams if I type `foo` the output is formatted as a code snippet. If instead of typing the code snippet, I...
Read more >
Why do I get an error when using Code block format...
I am trying to drop 16 lines of javascript in a ticket. I get the same error if I add to description or...
Read more >
100 Python Code Snippets for Everyday Problems
Here are a few! Printing on the Same Line. Along a similar line as formatting strings, sometimes you just need to print on...
Read more >
Community Code Snippets: Script Formatting Revisited (Part 1)
Always keep in mind that you are probably not the only one that will be maintaining your code. Don't leave a mess. Good...
Read more >
How to easily insert code snippet into Word preserving format ...
This is the step by step method to insert code snippet in Microsoft Word preserving formatting, syntax highlighting and line numbers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found