forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪟 🎉 Allow environment specific sections in docs (airbytehq#18829)
* Allow environment specific sections in docs * Change syntax to lower case
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
airbyte-webapp/src/components/common/DocumentationPanel/DocumentationPanel.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { prepareMarkdown } from "./DocumentationPanel"; | ||
|
||
const testMarkdown = `## Some documentation | ||
<!-- env:cloud --> | ||
### Only relevant for Cloud | ||
some specific documentation that only applies for cloud. | ||
<!-- /env:cloud --> | ||
<!-- env:oss --> | ||
### Only relevant for OSS users | ||
some specific documentation that only applies for OSS users | ||
<!-- /env:oss -->`; | ||
|
||
describe("prepareMarkdown", () => { | ||
it("should prepare markdown for cloud", () => { | ||
expect(prepareMarkdown(testMarkdown, "cloud")).toBe(`## Some documentation | ||
<!-- env:cloud --> | ||
### Only relevant for Cloud | ||
some specific documentation that only applies for cloud. | ||
<!-- /env:cloud --> | ||
`); | ||
}); | ||
it("should prepare markdown for oss", () => { | ||
expect(prepareMarkdown(testMarkdown, "oss")).toBe(`## Some documentation | ||
<!-- env:oss --> | ||
### Only relevant for OSS users | ||
some specific documentation that only applies for OSS users | ||
<!-- /env:oss -->`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters