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

Add Pasting Linting #446

Merged
merged 6 commits into from
Oct 9, 2022
Merged

Add Pasting Linting #446

merged 6 commits into from
Oct 9, 2022

Conversation

pjkaufman
Copy link
Collaborator

Fixes #372

Thanks again @chrisgrieser for suggestion this. It will hopefully be a very useful addition to the plugin.

Changes Made:

  • Updated documentation for new rules added
  • Made sure to ignore both YAML and Paste type rules for augmented example tests as they do not apply
  • Added the command for pasting without making any changes
  • Added the listener to modify the paste content before pasting by running active paste rules when the plugin is enabled
  • Added logic for running the Linter against the current line in a file and the text to paste
  • Added logic to the rule runner to accommodate the running of the current file for pasting
  • Added a rule type for pasting
  • Refactored ellipsis text that needs updating to be reused by both rules
  • Refactored indentation or blockquote regex to be reused where needed
  • Added a needed vault override to include the getConfig method
  • Added icon usage for the paste tab
  • Updated docs to reflect that psuedometadata suggested the additions and wrote the base for the logic
  • Added logic for the following rules on paste
    • Making pasted text continue the blockquote if it is more than one line and is being added to a blockquote
    • Preventing the doubling of list indicators
    • Preventing the doubling of checklist indicators
    • Converting three dots to an ellipsis even if there are spaces between the dots
    • Make sure to remove hyphens
    • Removing trailing whitespace and all non-tab leading whitespace
    • Removing footnote references

@pjkaufman pjkaufman added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 9, 2022
@pjkaufman pjkaufman self-assigned this Oct 9, 2022
@pjkaufman pjkaufman merged commit dfa5340 into platers:master Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: Linting of Copypasting
1 participant