-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update source prerequisite behavior #226
base: staging
Are you sure you want to change the base?
Update source prerequisite behavior #226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good at a glance. Could you add a test of this functionality? It would probably be similar to one of the tests you wrote in source_subfield.js. Thanks!
modules/presets/index.js
Outdated
let sourceRegex = /^source/; | ||
if (tag.match(sourceRegex) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let sourceRegex = /^source/; | |
if (tag.match(sourceRegex) ){ | |
if (tag.startsWith('source')) { |
@1ec5 I assume based on your comment that this is not ready to merge? |
I've been working on tests for this behavior for a while, more specifically for the |
Updates the behavior of multiple source fields. Now, a Source i will be visible if
source:i-1
has a non-empty value, or if any source tag with index > i has a non-empty value.This will ensure all Source fields from 1 to 3 to be visible if
source:3
has a non-empty value