Merge pull request #7353 from hashicorp/website-code-inline
website: Fix bug with new lines in code samples
This commit is contained in:
commit
8d58088472
96
website/package-lock.json
generated
96
website/package-lock.json
generated
|
@ -3069,9 +3069,9 @@
|
|||
}
|
||||
},
|
||||
"@hashicorp/react-code-block": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/react-code-block/-/react-code-block-1.2.5.tgz",
|
||||
"integrity": "sha512-uSiH2yM45CR2FG8XqWYSSB4xPP1jbPdDzwVsd1l3NcfTiJT9kOIVejTFf9OFddE6EpqHB03lTwr3Abz2pTmI1w==",
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/react-code-block/-/react-code-block-1.2.6.tgz",
|
||||
"integrity": "sha512-Uy/d74i0AH0qf3RwDLQVjih9s3GztC4Wbjjo4vkHTqcC7dNGBN9P+vDas4kuRN+npoha2la8ikD7CNRw47noiA==",
|
||||
"requires": {
|
||||
"@tippy.js/react": "^2.1.2",
|
||||
"highlight.js": "^9.15.6"
|
||||
|
@ -3290,23 +3290,54 @@
|
|||
}
|
||||
},
|
||||
"@hashicorp/react-text-split-with-code": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/react-text-split-with-code/-/react-text-split-with-code-0.0.4.tgz",
|
||||
"integrity": "sha512-x0lQhvwG25ICxMhf5VngZZzZuD7Wk2aWRTGm5gl9X1caLSrWgz7KpaKp/IwaS0Kjeqm20pyjwd8/9XinMVfFng==",
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/react-text-split-with-code/-/react-text-split-with-code-0.0.6.tgz",
|
||||
"integrity": "sha512-9zp0eIH0dwGgwMlcmX59h7CW18xj4RtmzqnWcddWuGVq2QDHh4fT+VNmhvh7RFlhTJ6GrJsRDFGZmzc2po54tA==",
|
||||
"requires": {
|
||||
"@hashicorp/react-code-block": "^1.2.5",
|
||||
"@hashicorp/react-global-styles": "^4.0.9",
|
||||
"@hashicorp/react-text-split": "^0.2.2"
|
||||
"@hashicorp/react-code-block": "^1.2.6",
|
||||
"@hashicorp/react-global-styles": "^4.0.10",
|
||||
"@hashicorp/react-text-split": "^0.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hashicorp/react-button": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/react-button/-/react-button-2.1.6.tgz",
|
||||
"integrity": "sha512-6ReNt9nbjsp//SSWErw/lQzf1unwzzIPdV/7FmJEOXSbmNVyeNJMyOOyFen/XhxUZefX2SuPtP3n48Q2U7bu0g==",
|
||||
"requires": {
|
||||
"@hashicorp/react-global-styles": "^4.0.10",
|
||||
"@hashicorp/react-inline-svg": "^1.0.0",
|
||||
"slugify": "^1.3.6"
|
||||
}
|
||||
},
|
||||
"@hashicorp/react-code-block": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/react-code-block/-/react-code-block-1.2.5.tgz",
|
||||
"integrity": "sha512-uSiH2yM45CR2FG8XqWYSSB4xPP1jbPdDzwVsd1l3NcfTiJT9kOIVejTFf9OFddE6EpqHB03lTwr3Abz2pTmI1w==",
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/react-code-block/-/react-code-block-1.2.6.tgz",
|
||||
"integrity": "sha512-Uy/d74i0AH0qf3RwDLQVjih9s3GztC4Wbjjo4vkHTqcC7dNGBN9P+vDas4kuRN+npoha2la8ikD7CNRw47noiA==",
|
||||
"requires": {
|
||||
"@tippy.js/react": "^2.1.2",
|
||||
"highlight.js": "^9.15.6"
|
||||
}
|
||||
},
|
||||
"@hashicorp/react-global-styles": {
|
||||
"version": "4.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/react-global-styles/-/react-global-styles-4.0.10.tgz",
|
||||
"integrity": "sha512-4YA2Svko3GqrfEdHWV08Yk3VIkNiMK5pVqslzDhVGnFNXP5FjL9G8c6RVrGXbgSY8Qwh8nBs1xJSalJGJynaUg=="
|
||||
},
|
||||
"@hashicorp/react-text-split": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/react-text-split/-/react-text-split-0.2.3.tgz",
|
||||
"integrity": "sha512-UASHSIr7bBxmIi35z8XW9RvMtF/gSUysbUjZeBehPbIRddD6dFLCCKW2RGv2EuA/+9Wc6aH7lkZASZUN64RgWw==",
|
||||
"requires": {
|
||||
"@hashicorp/react-button": "^2.1.6",
|
||||
"@hashicorp/react-global-styles": "^2.1.11-fonts.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hashicorp/react-global-styles": {
|
||||
"version": "2.1.11-fonts.0",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/react-global-styles/-/react-global-styles-2.1.11-fonts.0.tgz",
|
||||
"integrity": "sha512-Esy8CYsqTtYsEDWYaS3G8XTOl0HwzvYJZLtmSbcLwxYcK3hntNO4Sfko7y5hLWNNxN8CN0Gm/QujKlMnK7LmnQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -18489,8 +18520,7 @@
|
|||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
|
@ -18508,13 +18538,11 @@
|
|||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
@ -18527,18 +18555,15 @@
|
|||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
|
@ -18641,8 +18666,7 @@
|
|||
},
|
||||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
@ -18652,7 +18676,6 @@
|
|||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
|
@ -18665,20 +18688,17 @@
|
|||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.9.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.2",
|
||||
"yallist": "^3.0.0"
|
||||
|
@ -18695,7 +18715,6 @@
|
|||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
|
@ -18776,8 +18795,7 @@
|
|||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
|
@ -18787,7 +18805,6 @@
|
|||
"once": {
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -18863,8 +18880,7 @@
|
|||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
|
@ -18894,7 +18910,6 @@
|
|||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
@ -18912,7 +18927,6 @@
|
|||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
|
@ -18951,13 +18965,11 @@
|
|||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.1.1",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
"@hashicorp/react-button": "^2.1.5",
|
||||
"@hashicorp/react-call-to-action": "^0.1.2",
|
||||
"@hashicorp/react-case-study-slider": "^2.0.6",
|
||||
"@hashicorp/react-code-block": "^1.2.6",
|
||||
"@hashicorp/react-consent-manager": "^2.0.5",
|
||||
"@hashicorp/react-content": "^2.2.0",
|
||||
"@hashicorp/react-docs-sidenav": "^3.0.3",
|
||||
|
@ -26,7 +27,7 @@
|
|||
"@hashicorp/react-subnav": "^2.0.0",
|
||||
"@hashicorp/react-text-and-content": "^4.0.4",
|
||||
"@hashicorp/react-text-split": "^0.2.2",
|
||||
"@hashicorp/react-text-split-with-code": "0.0.4",
|
||||
"@hashicorp/react-text-split-with-code": "0.0.6",
|
||||
"@hashicorp/react-text-split-with-image": "^1.2.2",
|
||||
"@hashicorp/react-use-cases": "^1.0.4",
|
||||
"@hashicorp/react-vertical-text-block-list": "^2.0.1",
|
||||
|
|
|
@ -24,10 +24,9 @@ export default function SimpleContainerOrchestrationPage() {
|
|||
]
|
||||
}}
|
||||
codeBlock={{
|
||||
code: `
|
||||
task "webservice" {
|
||||
driver = "docker"
|
||||
|
||||
code: `task "webservice" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "redis:3.2"
|
||||
labels {
|
||||
|
@ -68,8 +67,7 @@ task "webservice" {
|
|||
]
|
||||
}}
|
||||
codeBlock={{
|
||||
code: `
|
||||
sc.exe start "Nomad"
|
||||
code: `sc.exe start "Nomad"
|
||||
|
||||
SERVICE_NAME: Nomad
|
||||
TYPE : 10 WIN32_OWN_PROCESS
|
||||
|
|
Loading…
Reference in a new issue