Comments (5)
The issue with removing multiple spaces is that it will remove spaces before and after text in a table as well. It can be handled, but that would take treating tables as special and then handling them as a one off. That is possible, but it would likely be some time before I could take a look at it assuming there is not a lot of desire for this from the community.
However, I would be fine with accepting a PR for this.
from obsidian-linter.
Hey @redactedscribe . I am not sure that this is a bug. If I recall, the reason tables are not affected is because removing multiple spaces in a table removes styling added to those tables like making sure all rows have the same length.
I am not sure I would want to change that behavior since it could mess up table styling which I have no intention of supporting in the Linter.
from obsidian-linter.
I understand your concerns @pjkaufman, however I do not style my tables so fixing >1 spaces would not be a problem in my case.
(Edit: By style I mean align the table using spaces. I do "style" it by having a space before and after vertical bars, which might require some support and is something I did not consider at first.)
Is "Remove Multiple Spaces" the only rule which doesn't run on tables? If so, Linter already supports tables you could say, it just doesn't touch spacing.
If that holds true, then instead of hardcoding skipping over the "Remove Multiple Spaces" rule, we could have an "Ignore rules from table linting" option with a list filter where we can add rule aliases (with "remove-multiple-spaces" listed by default).
This would then at least give us the option to remove "remove-multiple-spaces" if we don't want space-aligned tables in source.
from obsidian-linter.
It would mess with the following table styling:
| Foo | Bar |
| --------- | -------------------------------------------------------------------------- |
| Hello | World! Some double spaces and a link [here is link text1](link_here). |
would become
| Foo | Bar |
| --------- | -------------------------------------------------------------------------- |
| Hello | World! Some double spaces and a link [here is link text1](link_here). |
from obsidian-linter.
The issue with removing multiple spaces is that it will remove spaces before and after text in a table as well.
I understood this, which is why I suggested keeping the behaviour the same but letting users who don't want/need nicely spaced tables in their Markdown to opt out.
That is possible, but it would likely be some time before I could take a look at it assuming there is not a lot of desire for this from the community.
My assumption would be that some users do format their tables nicely, and others don't bother (which my guess would be the majority, but I don't know). For those that don't bother, I assume they'd also want them to be spaced like the rest of their file.
However, I would be fine with accepting a PR for this.
Thanks for being open to a PR.
from obsidian-linter.
Related Issues (20)
- Bug: Wikilinks get included when moving tags to frontmatter HOT 4
- FR: Format File Names HOT 9
- FR: Ability to disable some commands in command palette HOT 5
- Bug: Corrupts YAML HOT 9
- Bug: Urls with hash symbol in them do not get "angle bracketed" correctly HOT 6
- FR: Ensure single space after blockquote `>` angle brackets HOT 6
- FR: Add option to allow comments on the next line after a heading with `Heading blank lines` enabled
- Question: date created and updated in nested format HOT 3
- FR: Save without linting command HOT 4
- Regression: Since release 1.21.0, switching notes results in a loss of focus of the editor HOT 12
- Bug: Certain Use of Test Vault Causes Duplication of `Linter` Settings Tab HOT 1
- Regression: Linting in Live Preview does not update metadata block display since 1.21.1 HOT 15
- FR: Support baskslash `\` at line ending to insert line break HOT 9
- Bug: YAML Update in Visible Mode HOT 1
- Bug: the last modifed date issue
- Bug: Linter an URL adds the sign ">" after ...index.php (and not at the end, as expected) HOT 3
- spacing rule > Heading blank lines > bottom do not work HOT 7
- FR: add a CLI version of this linter HOT 2
- Question: run as git commit hook HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-linter.