-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sometimes, hljs generates text nodes that are direct descendents of a `code` element, without being the children of a `span`. rehype-hljs-var expects all text nodes to be the sole children of an element node. This change edits rehype-hljs-var to accommodate text nodes. It also refactors the plugin to clean up the logic for splitting text nodes with Var component placeholders.
- Loading branch information
Showing
4 changed files
with
184 additions
and
109 deletions.
There are no files selected for viewing
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,29 @@ | ||
1. Create a `main.tf` file containing this minimal Terraform code: | ||
|
||
```hcl | ||
terraform { | ||
required_providers { | ||
teleport = { | ||
source = "terraform.releases.teleport.dev/gravitational/teleport" | ||
version = "~> (=teleport.major_version=).0" | ||
} | ||
} | ||
} | ||
provider "teleport" { | ||
addr = '<Var name="teleport.example.com:443" />' | ||
} | ||
``` | ||
|
||
1. Then, init your Terraform working directory to download the Teleport provider: | ||
|
||
```code | ||
$ terraform init | ||
Initializing the backend... | ||
Initializing provider plugins... | ||
- Finding terraform.releases.teleport.dev/gravitational/teleport versions matching ... | ||
``` | ||
|
||
1. Finally, run a Terraform plan: | ||
|
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,30 @@ | ||
<ol> | ||
<li> | ||
<p>Create a <code>main.tf</code> file containing this minimal Terraform code:</p> | ||
<pre><code class="hljs language-hcl"><span class="hljs-keyword">terraform</span> { | ||
required_providers { | ||
teleport = { | ||
source = <span class="hljs-string">"terraform.releases.teleport.dev/gravitational/teleport"</span> | ||
version = <span class="hljs-string">"~> (=teleport.major_version=).0"</span> | ||
} | ||
} | ||
} | ||
|
||
<span class="hljs-keyword">provider</span> <span class="hljs-string">"teleport"</span> { | ||
addr = '<var name="teleport.example.com:443"></var>' | ||
} | ||
</code></pre> | ||
</li> | ||
<li> | ||
<p>Then, init your Terraform working directory to download the Teleport provider:</p> | ||
<pre><code class="hljs language-code">$ terraform init | ||
Initializing the backend... | ||
|
||
Initializing provider plugins... | ||
- Finding terraform.releases.teleport.dev/gravitational/teleport versions matching ... | ||
</code></pre> | ||
</li> | ||
<li> | ||
<p>Finally, run a Terraform plan:</p> | ||
</li> | ||
</ol> |
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