Stirling-PDF/cucumber/features
Omar Ahmed Hassan d5faddbc85
Enhancement: Enhance NFunction evaluation and support advanced NFunctions (#2577)
# Description

Enhance NFunction sanitization and support advanced functions:
- Start page counting from 1 rather than 0 as PDFs are one based from
the user's perspective, thus functions results would be affected by
starting with "0" rather than "1".
- Ignore out of bound results rather than stopping iterations to work
with functions such as (n - 4) when page count is 10 as we would get
positive values when n > 4.
- Remove spaces to support expressions such as 2n + 1 rather just 2n+1.
- Support advanced functions as follows:
- Support expressions such as follows 5(n-1), n(n-1), expressions
followed by opening rounded without '*' operator.
- Support expressions such as follows (n-1)5, (n-1)n, expressions
preceded closing rounded without '*' operator.
- Support consecutive "n" expressions, examples: nnn, 2nn, nn*3, nnnn.

Closes #(issue_number)

## Checklist

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have performed a self-review of my own code
- [ ] I have attached images of the change if it is UI based
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] If my code has heavily changed functionality I have updated
relevant docs on [Stirling-PDFs doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
- [x] My changes generate no new warnings
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)
2025-01-02 14:48:20 +00:00
..
steps X-API-key to X-API-KEY 2024-12-10 20:39:24 +00:00
environment.py
examples.feature
external.feature fixes and other changes and debug of WIP SAML (#2360) 2024-11-29 15:11:59 +00:00
general.feature Enhancement: Enhance NFunction evaluation and support advanced NFunctions (#2577) 2025-01-02 14:48:20 +00:00