Closed jasonmesser7 closed 2 years ago
I believe your "medium" suggestion is the best.
Today Simdem is only interested in executable Bash. Adding the Bash identifier would result in the code being properly rendered when using the markdown for human consumption and, as you suggest, would be clearly mark executable content.
I can't imagine what SimDem would do with non-executable content such as JSON or YAML. So let's not complicate things with that until there is a solid use case.
I believe this is fixed in #123, a test case is included in that PR. @jasonmesser7 please verify and close this issue if that is correct.
Note the fix in #123 is dependent on #122 if an expected_similarity rating is required on a result block. However, where no similarity is needed it works as expected. Bumping the priority of #122 as a result
Simdem does not support yaml code samples in back ticks. In Azure documentation it is common to do the following
Example blocker:
Here is the raw code.
`
yaml apiVersion: apps/v1 kind: Deployment metadata: name: azure-vote-back spec: replicas: 1 selector: matchLabels: app: azure-vote-back template: metadata: labels: app: azure-vote-back spec: nodeSelector: "kubernetes.io/os": linux containers:containerPort: 6379 name: redis
apiVersion: v1 kind: Service metadata: name: azure-vote-back spec: ports:
port: 6379 selector: app: azure-vote-back
apiVersion: apps/v1 kind: Deployment metadata: name: azure-vote-front spec: replicas: 1 selector: matchLabels: app: azure-vote-front template: metadata: labels: app: azure-vote-front spec: nodeSelector: "kubernetes.io/os": linux containers:
name: REDIS value: "azure-vote-back"
apiVersion: v1 kind: Service metadata: name: azure-vote-front spec: type: LoadBalancer ports:
Suggested solutions: Easiest - Anytime there is a character after ``` on the same line simply output the below command, do not execute. Medium - require a tag of 'bash' or another key word to be placed in front of all code samples that you want ran. Print all other sections as normal Hard- Code Simdem to simply print output and potentially respond differently to specific listed tags like json, yaml, output etc.