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

[Sources] Allow source_diff to wrap dead sources in quotes #714

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DontTalkToMeThx
Copy link
Contributor

@DontTalkToMeThx DontTalkToMeThx commented Aug 8, 2024

Fixes #554

Allows you to wrap sources in quotes, meaning dead sources can be added like so:

{
  "post": {
    "source_diff": "\"-test source\""
  }
}

and removed (oddly) like so:

{
  "post": {
    "source_diff": "-\"-test source\""
  }
}

Yeah, it's weird, but it's better than not being able to do it.

This isn't required though, you can add/remove regular sources exactly the same as before. This does however mean no sources can start or end with quotes (when added with source_diff), which at the moment affects 40 posts:
https://e621.net/posts?tags=~source:\"* ~source:*\"

and I'd argue all of them are invalid sources anyways...

Alternatively, the prefix/suffix can be anything, it doesn't need to be quotes.

@DontTalkToMeThx DontTalkToMeThx changed the title Allow source_diff to wrap dead sources in quotes [Sources] Allow source_diff to wrap dead sources in quotes Aug 8, 2024
@DontTalkToMeThx
Copy link
Contributor Author

I swear I'll remember these square brackets without renaming one day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lang: Ruby Posts Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding dead sources through the API
2 participants