Open mxsasha opened 3 years ago
The problem here seems to be a bug with rst2html
.
.. vale off
this text should be fine
------------------------
.. vale on
This text should be fine.
.. vale off
this text should be fine
.. vale on
If you run rst2html
on the above file, you'll get
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>this text should be fine</title>
</head>
<body>
<div class="document" id="this-text-should-be-fine">
<h1 class="title">this text should be fine</h1>
<!-- vale off -->
<!-- vale on -->
<p>This text should be fine.</p>
<!-- vale off -->
<p>this text should be fine</p>
<!-- vale on -->
</div>
</body>
</html>
The vale off
comment appears after the heading in the output, even though it appears before the heading in the input.
We have this issue as well in the Mautic docs, which causes our checks to fail as we need to use camel case where a part of the product is included in the heading.
I get a similar but maybe related issue with Ascii docs (in this case, Antora). I have some pages which relate to 'My Account' and so forth, so it's erroring on Google.FirstPerson, but I can't wrap the heading of the page in a Vale statement without getting a critical error:
Level 0 sections can only be used when doctype is book ascidoctor.js
This RST:
with a style that forbids the word "text", still generates an error:
In my understanding, no error should be raised in this case.
With the exact same setup, this file (correctly) does not generate an error.
Tested with .vale.ini as:
and the only style in example-styles being:
Seen on Mac OS 11.2.1, vale 2.9.1 installed through homebrew. It's a bit too complicated (and I don't know Go) to debug further on my own.