FR: Format the code gracefully
See original GitHub issueIs Your Feature Request Related to a Problem? Please Describe.
Whenever I copy my code from vscode to obsidian, the following puzzling phenomena will occur vscode: Copying to obsidian becomes code with many newlines
A clear and concise description of what the problem is. Ex. I’m always frustrated when […] To tell the truth, these new lines will make me feel very uncomfortable
Describe the Solution You’d Like
I hope so, and it will be better to carry the function of automatically formatting code, just like Prettier
A clear and concise description of what you want to happen.
Please include an example where applicable:
```jsx
export default class App extends Component {
constructor() {
this.state = {
age: 18,
};
}
render() {
return <ChildComp props={{ age: this.age }}></ChildComp>;
}
}
``` markdown
```jsx
export default class App extends Component {
constructor() {
this.state = {
age: 18,
};
}
render() {
return <ChildComp props={{ age: this.age }}></ChildComp>;
}
}
## Describe Alternatives You've Considered
A clear and concise description of any alternative solutions or features you've considered.
## Additional Context
Add any other context or screenshots about the feature request here.
Issue Analytics
- State:
- Created 10 months ago
- Comments:7
Top Results From Across the Web
gracefully handle the fact that Black does not support "Format ...
The latest VS Code allows the users to configure the formatting for the entire file or line of code changed, so many sure...
Read more >How to get Python to gracefully format None and non-existing ...
The recommendation in PEP 3101 is to subclass Formatter: import string class PartialFormatter(string.Formatter): def __init__(self, ...
Read more >mercurial / format-source · GitLab - Projects - Heptapod
A Mercurial extension to apply and gracefully merge code formatting.
Read more >Piping buffer through a command, handling failure gracefully
I want to be able to lint my code ...
Read more >Reformat and rearrange code | PyCharm Documentation
You can select formatting rules which will be ignored when you reformat the code. For example, you can adjust the IDE to keep...
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 a normal obsidian feature. You can toggle it off in the settings under
Editor → Display → Show indentation guides
: Toggled On:Toggled Off:
Addendum:
This is not completely correct. The indentation guides are triggered when the depth for a tab is reached. This means that either pressing a tab, or X spaces will be rendered the same. The setting
Editor → Behaviour → Tab Indent Size
will decide how many spaces a tab gets rendered as.Hey @Chen-913 , I wanted to see if the suggested setting change satisfies your request. The Linter cannot get rid of those visual indentation indicators as they are a display setting created Obsidian. If it does not fix your issue, if you could clarify exactly what kind of codeblock formatting you are looking for, this may become a small enough scope to make it actionable. Thanks!