Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions styles/Canonical/026-hints-tips.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 026 - Hint and tip blocks

extends: existence
message: "Avoid 'hint' and 'tip' admonitions. Instead, use a regular paragraph or the 'admonition' directive with a descriptive title."
scope: raw
nonword: true
level: suggestion
tokens:
- '.. hint::'
- '.. tip::'
- '(````*|::::*) *?{hint}'
- '(````*|::::*) *?{tip}'
46 changes: 46 additions & 0 deletions tests/data/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2050,3 +2050,49 @@ rules:
Line 35
Line 36
severity: warning
026-hints-tips:
cases:
- id: valid
filetypes: [md, rst]
content: |
.. hint::
This is a reST hint.
.. tip::
This is a reST tip.
```{hint}
This is a MyST hint.
```
```{tip}
This is a MyST tip.
```
````{hint}
This is a deeper MyST hint.
````
````{tip}
This is a deeper MyST tip.
````
:::{hint}
This is a colon-fenced MyST hint.
:::
:::{tip}
This is a colon-fenced MyST tip.
:::
::::{hint}
This is a deeper colon-fenced MyST hint.
::::
::::{tip}
This is a deeper colon-fenced MyST tip.
::::
expect:
triggers:
- '.. hint::'
- '.. tip::'
- '```{hint}'
- '```{tip}'
- '````{hint}'
- '````{tip}'
- ':::{hint}'
- ':::{tip}'
- '::::{hint}'
- '::::{tip}'
severity: suggestion
1 change: 1 addition & 0 deletions vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Canonical.019-no-google-drive-images = error
Canonical.025a-latinisms-with-english-equivalents = suggestion
Canonical.025b-latinisms-to-reconsider = suggestion
Canonical.025c-latinisms-to-avoid = suggestion
Canonical.026-hints-tips = suggestion
Canonical.400-Enforce-inclusive-terms = error
Canonical.500-Repeated-words = warning

Expand Down