Skip to content

Add the [<ignore>] syntax#15

Merged
ilya-lesikov merged 4 commits intoflant:masterfrom
sanex3339:ignore-syntax
Mar 19, 2025
Merged

Add the [<ignore>] syntax#15
ilya-lesikov merged 4 commits intoflant:masterfrom
sanex3339:ignore-syntax

Conversation

@sanex3339
Copy link
Contributor

@sanex3339 sanex3339 commented Mar 16, 2025

For our case, we need the support of the [<ignore>] syntax.

const template = () => {
  return (
    // [<snippet example>]
    <Provider
      // [<ignore>]
      propToIgnore={propToIgnore}
      // [<endignore>]
      component={() => <div>Data is loading...</div>}
      errorComponent={({ message }) => <div>There was an error: {message}</div>}
    >
       <div>...</div>
    </Provider>
    // [<endsnippet example>]
  );
};

So the result is:

    <Provider
      component={() => <div>Data is loading...</div>}
      errorComponent={({ message }) => <div>There was an error: {message}</div>}
    >
       <div>...</div>
    </Provider>

So, what we want is to exclude a subset of an imported snippet.
Also I added a few tests

Fixes #14

@sanex3339 sanex3339 mentioned this pull request Mar 16, 2025
@sanex3339
Copy link
Contributor Author

@ilya-lesikov hi, would you mind taking a look please

@ilya-lesikov ilya-lesikov merged commit 35a8e3c into flant:master Mar 19, 2025
0 of 6 checks passed
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.

The [<ignore>] syntax

2 participants