Skip to content

1714 conditional tag cmp working on two properties#1735

Draft
Jo-Be-Co wants to merge 5 commits intormcrackan:masterfrom
Jo-Be-Co:bifunctions
Draft

1714 conditional tag cmp working on two properties#1735
Jo-Be-Co wants to merge 5 commits intormcrackan:masterfrom
Jo-Be-Co:bifunctions

Conversation

@Jo-Be-Co
Copy link
Copy Markdown
Contributor

No description provided.

@Jo-Be-Co
Copy link
Copy Markdown
Contributor Author

still need to add documentation and some more tests

@Jo-Be-Co
Copy link
Copy Markdown
Contributor Author

However, the changes have already been implemented to the extent that a review is possible – I’m open to feedback and requests for adjustments.

@rmcrackan
Copy link
Copy Markdown
Owner

Overall this looks good. There are some broken tests related to :

[DataRow("<!cmp author != 'Sherlock'->false<-cmp>", "")]
[DataRow("<cmp tag = 'Tag1'->true<-cmp>", "true")]
[DataRow("<cmp tag[separator(:)slice(-2..)] = 'Tag2:Tag3'->true<-cmp>", "true")]
[DataRow("<cmp tag[separator( : )slice(-2..)] = 'Tag2 : Tag3'->true<-cmp>", "true")]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity, can you include this test with and without the spaces

@rmcrackan
Copy link
Copy Markdown
Owner

Your latest commit looks nice.

@Jo-Be-Co
Copy link
Copy Markdown
Contributor Author

In fact, I would have liked to avoid the parsing of the property and leave it to the later evaluation.

However, situations will always come (like the : ) in which the blanket collection no longer works. Especially because, for example, everything possible can be used as a delimiter.

Therefore, the regular expression must then take into account the syntax with '...', "..." and [...]. All with somewhat different escape behaviour. And even so, we can't guarantee everything here ...

@Jo-Be-Co
Copy link
Copy Markdown
Contributor Author

Your latest commit looks nice.

Did you intend to target the mathematical operations and symbols?

@rmcrackan
Copy link
Copy Markdown
Owner

Did you intend to target the mathematical operations and symbols?

Not sure what you mean, so I assume the answer is no.

@Jo-Be-Co
Copy link
Copy Markdown
Contributor Author

Based on your comment that my last commit looks nice, I first thought that you meant the corrections on the regular expression and then had the feeling that I finally actually added the comparisons for lists and the operators ≡≠≤≥∉∌∈∌⋂⊆⊇⊂⊃.

Anyway, syntax is actually just a proposal. As this new <cmp-> tag could do everything the <is-> tag can do, the latter might be finesse-superceded, though it is that new...

@rmcrackan
Copy link
Copy Markdown
Owner

Nope. I meant addressing the :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants