From 76ec9fe18b844e5b369af35ebbfe4c527836a212 Mon Sep 17 00:00:00 2001 From: cyphercodes Date: Wed, 1 Jul 2026 06:33:35 +0300 Subject: [PATCH] test: add AsciiDoc source-position regression --- testdata/features/lint.feature | 8 ++++++++ testdata/fixtures/formats/adoc/.vale.ini | 3 +++ testdata/fixtures/formats/adoc/styles/Test/Semicolons.yml | 7 +++++++ testdata/fixtures/formats/adoc/test4.adoc | 3 +++ 4 files changed, 21 insertions(+) create mode 100644 testdata/fixtures/formats/adoc/styles/Test/Semicolons.yml create mode 100644 testdata/fixtures/formats/adoc/test4.adoc diff --git a/testdata/features/lint.feature b/testdata/features/lint.feature index 43a79c0f..017c0b60 100755 --- a/testdata/features/lint.feature +++ b/testdata/features/lint.feature @@ -115,6 +115,14 @@ Feature: Lint """ And the exit status should be 0 + Scenario: Lint an AsciiDoc sentence after a document-header attribute (#1112) + When I lint AsciiDoc "test4.adoc" + Then the output should contain exactly: + """ + test4.adoc:2:283:Test.Semicolons:semicolon match + """ + And the exit status should be 1 + Scenario: Lint a DITA file When I lint "test.dita" Then the output should contain exactly: diff --git a/testdata/fixtures/formats/adoc/.vale.ini b/testdata/fixtures/formats/adoc/.vale.ini index 7cada7aa..292bb757 100644 --- a/testdata/fixtures/formats/adoc/.vale.ini +++ b/testdata/fixtures/formats/adoc/.vale.ini @@ -11,3 +11,6 @@ Test.Rule2 = YES [test3.adoc] BasedOnStyles = Vale + +[test4.adoc] +Test.Semicolons = YES diff --git a/testdata/fixtures/formats/adoc/styles/Test/Semicolons.yml b/testdata/fixtures/formats/adoc/styles/Test/Semicolons.yml new file mode 100644 index 00000000..eed19a89 --- /dev/null +++ b/testdata/fixtures/formats/adoc/styles/Test/Semicolons.yml @@ -0,0 +1,7 @@ +extends: existence +message: "semicolon match" +scope: sentence +level: error +nonword: true +tokens: + - ';' diff --git a/testdata/fixtures/formats/adoc/test4.adoc b/testdata/fixtures/formats/adoc/test4.adoc new file mode 100644 index 00000000..f68131d3 --- /dev/null +++ b/testdata/fixtures/formats/adoc/test4.adoc @@ -0,0 +1,3 @@ +:pdf-fontsdir: {sourcedir}/docs/themes/fonts;GEM_FONTS_DIR +the component fails two checks the phase requires, and screenshot of the full table hides both. The first pass uses the stock Tailwind utilities `text-yellow-500`, `text-gray-400`, and `text-amber-700`, not the theme tokens, so a later brand change to the teal would skip this table; and it applies them as colored text on a white header, where the muted colors fall below the contrast bar in xref:#done[] (the brand teal on white is about 2.5:1, under the 4.5:1 minimum for text). The art-direction note already calls for the theme color as a fill rather than as text, so the fix is a token-bound `bg-theme-*` fill with dark text on top, which both binds to the token and clears the contrast bar. An empty `records` array renders an empty bordered table, which a reader can't tell apart from a broken page. The refresh feed returns no values in the initial load, so that state is real, and the first pass left it unhandled. +.. *Correction*