Skip to content

Commit 4c67caf

Browse files
authored
Merge pull request #186 from CooperRedhat/copy-fix
Update regex to pick up tabbed blocks
2 parents b5a0af1 + bcf9c6d commit 4c67caf

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

packages/dev/src/quickstarts-data/quick-start-test-data.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import sampleApplicationQuickstart from './yaml/sample-application-quickstart.ya
2121
import serverlessApplicationQuickstart from './yaml/serverless-application-quickstart.yaml';
2222
import springWithS2i from './yaml/spring-with-s2i.yaml';
2323

24+
// bug-fix examples
25+
import openShiftTabbedQuickStart from './yaml/openshift-tabbed-copy.yaml';
26+
2427
// In-app documentation examples
2528
import exampleHelpTopics from './yaml/in-app-documentation/example-topics.yaml';
2629

@@ -38,6 +41,8 @@ export const allQuickStarts: QuickStart[] = [
3841
sampleApplicationQuickstart,
3942
serverlessApplicationQuickstart,
4043
springWithS2i,
44+
45+
openShiftTabbedQuickStart,
4146
];
4247

4348
export const localizedQuickStarts: QuickStart[] = [csDemo, enDemo];
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
apiVersion: console.openshift.io/v1
2+
kind: ConsoleQuickStart
3+
metadata:
4+
name: example
5+
spec:
6+
conclusion: >-
7+
Your example **httpd-24-centos7-app** application, using the
8+
**quay.io/centos7/httpd-24-centos7** image, is deployed and ready.
9+
description: Deploy an example application from an image.
10+
displayName: Deploy image
11+
durationMinutes: 5
12+
introduction: >-
13+
### In this example quick start, you'll deploy an existing image to
14+
OpenShift. For more information on writing quick starts, see our [quick
15+
start
16+
guidelines.](http://openshift.github.io/openshift-origin-design/conventions/documentation/quick-starts.html)
17+
tags:
18+
- example
19+
- image
20+
- deployment
21+
tasks:
22+
- description: |-
23+
### To deploy the **httpd-24-centos7** image, follow these steps:
24+
25+
```
26+
This can be copied.
27+
```{{copy}}
28+
29+
1. Enter the developer perspective: In the main navigation menu, click
30+
the [dropdown menu]{{highlight tour-perspective-dropdown}} and select
31+
**Developer**.
32+
33+
```
34+
This cannot be copied.
35+
```{{copy}}
36+
37+
2. In the main navigation menu, click **Add.**
38+
39+
3. Using the project dropdown menu, select the project you would like to
40+
deploy the image in.
41+
42+
4. Click the **Container Image** tile.
43+
44+
5. In the **Image name from external registry** field, enter
45+
**quay.io/centos7/httpd-24-centos7**.
46+
47+
6. Fill in the remaining image deployment details, and then click
48+
**Create.**
49+
50+
51+
The **Topology** view will load with your **httpd-24-centos7-app**
52+
application. The outer rim of the larger circle represents your
53+
application, and the small circle represents the deployment.
54+
review:
55+
failedTaskHelp: This task isn't verified yet. Try the task again.
56+
instructions: |-
57+
#### Verify the image was successfully deployed:
58+
Do you see a **httpd-24-centos7** deployment?
59+
summary:
60+
failed: Try the steps again.
61+
success: >-
62+
Great work! You deployed an example application using the
63+
**quay.io/centos7/httpd-24-centos7** image.
64+
title: Deploy an existing image from an image registry

packages/module/src/ConsoleShared/src/components/markdown-extensions/inline-clipboard-extension.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const useInlineCopyClipboardShowdownExtension = () => {
1111
return React.useMemo(
1212
() => ({
1313
type: 'lang',
14-
regex: /`([^`](.*?)[^`])`{{copy}}/g,
14+
regex: /```[\n]\s*((((?!```).)*?\n)+)\s*```{{copy}}/g,
1515
replace: (
1616
text: string,
1717
group: string,

0 commit comments

Comments
 (0)