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

Includes not rendering when variable has https:// #46

Open
greedy52 opened this issue Nov 28, 2023 · 2 comments
Open

Includes not rendering when variable has https:// #46

greedy52 opened this issue Nov 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@greedy52
Copy link

https://github.com/gravitational/teleport/blob/717e5969e3326157a670e7aaa0244378eb8902b1/docs/pages/database-access/guides/snowflake.mdx#L43

(!docs/pages/includes/database-access/db-configure-start.mdx dbName="example-snowflake" dbProtocol="snowflake" databaseAddress="https://abc12345.snowflakecomputing.com" !)
Screenshot 2023-11-28 at 1 21 07 PM

Note that redis:// works fine in another page. Also removing https:// also works.

@greedy52 greedy52 added the bug Something isn't working label Nov 28, 2023
@ptgott
Copy link
Contributor

ptgott commented Dec 4, 2023

I'm pretty sure the problem is that:

  • When the docs engine generates a Markdown AST of the docs page, the https:// URL inside the parameter value is being converted to a Markdown link node (which is why there is a link in the example).
  • Because the Markdown AST paragraph node that includes the (! !) expression also includes a link node, the code that resolves the includes doesn't detect it to be an include expression, since parent.children && parent.children.length === 1 is false.

Have you found a workaround?

@greedy52
Copy link
Author

greedy52 commented Dec 4, 2023

Have you found a workaround?

I didn't find a workaround to get https:// working. I dropped https:// part from the var since it's optional on teleport/docs side so this is not urgent.

@ptgott ptgott transferred this issue from gravitational/docs Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants