Answers being printed without newlines
See original GitHub issueWhen I run howdoi
, the answer is compressed into a single line.
Example in fish shell:
~ howdoi -c python json decode
import json j = json.loads('{"one" : "1", "two" : "2", "three" : "3"}') print j['two']
Example in bash:
chris@galactica:~$ howdoi -c python json decode
import json j = json.loads('{"one" : "1", "two" : "2", "three" : "3"}') print j['two']
I have tried add/removing various flags to see if that makes a difference, but the behaviour stays consistent:
~ howdoi python json decode
import json j = json.loads('{"one" : "1", "two" : "2", "three" : "3"}') print j['two']
~ howdoi -a python json decode
★ Answer from https://stackoverflow.com/questions/7771011/parse-json-in-python ★
Very simple:
import json j = json.loads('{"one" : "1", "two" : "2", "three" : "3"}') print j['two']
It is not just this specific query that acts this way, every question I enter behaves like this.
It seems that all the <pre>
blocks in each answer are being compressed into a single line. In the case where an answer contains multiple <pre>
blocks, they each appear on separate lines.
I think this is quite a recent development, but I can’t pin exactly when it started occurring. Let me know if there is any other useful information I can provide.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to print without a newline or space - python
In Python 3, you can use the sep= and end= parameters of the print function: To not add a newline to the end...
Read more >Python Print Without Newline: Step-by-Step Guide
Printing without a new line is simple in Python 3. In order to print without newline in Python, you need to add an...
Read more >How to Print Without Newline in Python—A Simple Illustrated ...
Summary: To print without the newline character in Python 3, set the end argument in the print() function to the empty string or...
Read more >Suppressing the automatic newline in Print
Print automatically generates a newline at the end of the expression that is being printed. How do you suppress this automatic newline?
Read more >Output numbers, but WITHOUT a new line. - MATLAB Answers
So I have a for-loop, and at every iteration, I would like to display formatted text, along with some numbers. Normally one could...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fixed in #187. Will release a new version shortly
I just manually installed
pyquery==1.3.0
in my howdoi venv and it fixed the issue for me too.