Closed gaurav-nelson closed 4 years ago
Thanks for the report.
Are you able to share the actual Markdown file (or a functionally equivalent copy of) containing the <!-- vale off -->
comments? It's not clear to me where exactly these comments are from your rendered examples.
Thanks @jdkato
Here are the contents of:
test1.md
file
1. Consider the following `deployment.yaml` file.
```yaml
apiVersion: v1
kind: Service
metadata:
name: my-nginx-svc
labels:
app: nginx
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: nginx
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-nginx
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
SSH should not typically be used within containers.
Ensure that non-SSH services are not using port 22.
something else.
2. `test2.md` file. (Same as `test1.md` without `---` appearing in yaml example.
Consider the following deployment.yaml
file.
apiVersion: v1
kind: Service
metadata:
name: my-nginx-svc
labels:
app: nginx
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: nginx
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-nginx
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
few other steps.
The output lists the failure code and policy violation details.
SSH should not typically be used within containers.
Ensure that non-SSH services are not using port 22.
something else.
I may be muddying the waters here, but I've seen similar behavior when attempting to use <!-- vale off -->
on a specific list item in an unordered list. My team at the time found that we had to wrap the entire ordered list in <!-- vale off -->
/ <!-- vale on -->
tags, even if we just wanted to disable linting on a single item in the list. @gaurav-nelson have you tested this behavior?
I had assumed at the time that this was a ReStructuredText issue, but I'm tackling https://gitlab.com/gitlab-org/gitlab/issues/208081 today in documentation that uses Markdown, and I'm finding the same result. Single list item == no disabling, but disabling linting on the entire list works properly.
Thanks @amyq for chiming in. That seems a bit strange, I have noticed this behavior sometimes but wasn't able to identify the cause. In my not so real world test the following worked as usual, that is Vale didn't show errors and honored the off and on comments.
## Heading One
This is an introductory paragraph to check if vale works inside an unordered
list.
- Unordered list example.
<!-- vale off -->
- SSH should not typically be used within containers. Ensure that non-SSH services are not using port 22.
<!-- vale on -->
- one more item.
something else.
@amyq Can you point to exact docs where you have had to ignore whole lists? I am guessing it has to do something with lists with code blocks or multiple level items.
Since Amy can't get to that repo anymore, I've got a couple of examples. Hopefully I've pulled out the examples she was thinking of :)
In this file, you'll see vale off/on around an unordered list. The word 'Simple' is an error in our tests (I think it came out of write.good?) If I change it to put .. vale on in the middle of the list, it breaks the list (as I would expect it to in RST - /Users/lynette.miles/docs/docs/commerce/configuration.rst:76: WARNING: Bullet list ends without a blank line; unexpected unindent.)
This page is publicly available at: https://docs.acquia.com/commerce/configuration/
``.. include:: ../common/global.rst
.. toctree:: :hidden: :glob:
/commerce/configuration/*
As an administrator, you need to configure the various sections of your Drupal website to ensure that it will synchronize your products, services, and users, while also ensuring that your website displays those items in the desired fashion. Understanding your configuration settings and where to find them will help you set up your commerce website properly. Here, we discuss the various commerce configuration settings:
Checkout Settings <commerce-checkout-settings>
SKU Settings <commerce-sku-settings>
Commerce Connector Service Settings <conductor-settings>
Currency Settings <commerce-currency-settings>
Commerce User Settings <commerce-user-settings>
Synchronize <commerce-synchronize-promotions>
You can access the settings for each of the previous items by completing the following steps:
.. _commerce-checkout-settings:
Checkout settings control the flow of the checkout process for your users. You can add custom checkout flows with development work.
.. _commerce-sku-settings:
SKU settings control the types of SKUs that your commerce website uses. These are added by your commerce solution and synchronized to Drupal. The default types are as follows:
.. vale off
.. vale on
.. _conductor-settings:
Commerce Connector Service settings are described in the Acquia Commerce Manager
Drupal module installation, in the :ref:Commerce Connector Service settings <commerce-config-connector-service>
section.
.. _commerce-currency-settings:
Use the following currency settings to determine how your currency will display for your products and cart:
0
to 4
... _commerce-user-settings:
Various user settings
.. _commerce-synchronize-promotions:
The Synchronize promotions button on this page manually synchronizes promotion information between your Drupal website and your commerce solution.
This page has two buttons that enable you to manually synchronize data between your Drupal website, and your commerce solution. Clicking either button will attempt to synchronize its respective data, in a queue.
async
): When clicked, products are updated
asynchronously from your commerce solution, in batches. This ensures
performance and stability for your Drupal website and your
commerce solution.File 2: This file is using vale on an ordered list. Vale wraps the entire list, because the word 'Just' is an error in our tests. However, if you try to surround only that line (#. Enter a trigger type named Clicks - Just Links.) with .. vale off/vale on, it acts as though you've intended to break the numbering. given that there's blank lines, it makes sense. We always assumed this was a limitation of RST. This page is publicly available at: https://docs.acquia.com/lift/profile-mgr/event/
``.. include:: ../../common/global.rst
To help you understand how your website visitors interact with your website, and to receive a personalized experience, your website sends your visitors' interactions (also known as captures) to Acquia Lift. Depending on your website's size and implementation, you must consider thousands of types of interactions.
Acquia Lift includes descriptive containers called events you can use to compartmentalize your captures by a common theme (such as shares or registrations) or conversion events (including clicks).
lift-creating-new-events
lift-example-creating-capture-event-google-tag-manager
lift-creating-trigger-gtm
lift-creating-tag-gtm
lift-testing-tag-gtm
lift-testing-lift-received-data
lift-managing-events
lift-viewing-reports-based-events
lift-displaying-filter-settings
lift-limiting-report-results
.. _lift-creating-new-events:
To create new descriptive events for the website visitor captures Acquia Lift receives from your website, complete the following steps:
you want to track.
want the event to apply. Click Global to use the event across all your websites.
the form as shown in the following screenshot:
|Custom Event|
After you create a new event, you must send the capture
request from the
webpage using Google Tag Manager <https://marketingplatform.google.com/about/tag-manager/>
__.
To send the capture
request, you must locate an existing trigger in Google
Tag Manager, and create a tag with custom HTML.
For more information about creating or using an existing trigger, and creating a tag using Google Tag Manager, see :ref:`Creating a custom event capture with added variables
Thanks @esmerel
Looks like an .rst
example. Since, GitHub rendered most of the text, I can't see .. vale off
and on
comments. Maybe create a Gist and share.
Yep, sorry, I wasn't thinking: Here: https://gist.github.com/esmerel/5347abdcd49208a9f041c555790a68ce - I've put each file in so you can see the on/off commands in the raw text.
So, it looks like there are three issues being discussed here:
---
causing Vale to ignore comments. This was an upstream bug (https://github.com/yuin/goldmark/issues/111) and will be fixed in the next release.<!-- vale off -->
on a specific unordered list item. I wasn't able to reproduce this on a test file, but I'll gladly look into it more if you (@amyq) have a example failing case... vale off
within a reStructuredText list. This simply appears to unsupported syntax as rst2html
gives an error (Bullet list ends without a blank line; unexpected unindent.
).
I probably have an edge case. I have put in
<!-- vale off -->
comment (inside a numbered list) in my markdown file but its still reporting errors.I have a numbered list with a YAML code example (test1.md) and have put it ignore comments for second list item. However, Vale is not honoring the ignore comments. But it works fine (show no errors) if I remove
---
from my YAML example (test2.md).I have added test1.md and test2.md below, and I am using Microsoft style.
Vale error
test1.md
````` 1. Consider the following `deployment.yaml` file. ```yaml apiVersion: v1 kind: Service metadata: name: my-nginx-svc labels: app: nginx spec: type: LoadBalancer ports: - port: 80 selector: app: nginx --- apiVersion: apps/v1 kind: Deployment metadata: name: my-nginx labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 ``` 1. few other steps. 1. The output lists the failure code and policy violation details. ```bash SSH should not typically be used within containers. Ensure that non-SSH services are not using port 22. ``` something else. `````
test2.md
````` 1. Consider the following `deployment.yaml` file. ```yaml apiVersion: v1 kind: Service metadata: name: my-nginx-svc labels: app: nginx spec: type: LoadBalancer ports: - port: 80 selector: app: nginx apiVersion: apps/v1 kind: Deployment metadata: name: my-nginx labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 ``` 1. few other steps. 1. The output lists the failure code and policy violation details. ```bash SSH should not typically be used within containers. Ensure that non-SSH services are not using port 22. ``` something else. `````