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

fix(directives): allow multiline and leading spaces #1669

Merged
merged 3 commits into from Apr 24, 2024

Conversation

carlocorradini
Copy link
Contributor

Fix #1423

Copy link

codecov bot commented Apr 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.50%. Comparing base (be33fd4) to head (0b61720).
Report is 18 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1669   +/-   ##
=======================================
  Coverage   95.50%   95.50%           
=======================================
  Files         113      113           
  Lines        1847     1847           
  Branches      364      362    -2     
=======================================
  Hits         1764     1764           
  Misses         83       83           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@carlocorradini
Copy link
Contributor Author

carlocorradini commented Apr 20, 2024

Now it's allowed to do this:

@Directive(`
  @name(
    argument: "value",
    hello: "world
  )
`)

Since the directive is firstly inlined and trimmed (start)

@carlocorradini
Copy link
Contributor Author

@MichalLytek Can be seen as a feature?

@carlocorradini carlocorradini marked this pull request as draft April 21, 2024 10:17
@carlocorradini carlocorradini marked this pull request as ready for review April 21, 2024 17:40
@carlocorradini
Copy link
Contributor Author

@MichalLytek I'm missing something in the test directive definition since the test should pass but the error does not refere to the correct test. I really don't know what I'm missing 😭

@MichalLytek MichalLytek changed the title fix: allow @Directive definition multiline and leading spaces fix(directives): allow multiline and leading spaces Apr 24, 2024
@MichalLytek MichalLytek merged commit 06c041a into MichalLytek:master Apr 24, 2024
7 checks passed
@MichalLytek MichalLytek added Community 👨‍👧 Something initiated by a community Bugfix 🐛 🔨 PR that fixes a known bug labels Apr 24, 2024
@MichalLytek MichalLytek added this to the 2.0 release milestone Apr 24, 2024
MichalLytek added a commit that referenced this pull request Apr 24, 2024
* fix: allow @directive definition multiline and leading spaces

* test: better multiline and leading whitespaces tests

* Fix assert directive

---------

Co-authored-by: Michał Lytek <michal.wojciech.lytek@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 🔨 PR that fixes a known bug Community 👨‍👧 Something initiated by a community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add error or warning message if @Directive SDL string contains newline characters
2 participants