Skip to content

Commit 5d3b741

Browse files
authored
Merge pull request #59 from yarikoptic/enh-codespell
Add codespell support (config, workflow to detect/not fix) and make it fix few typos
2 parents 968d585 + 743cac7 commit 5d3b741

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

.github/workflows/codespell.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Codespell configuration is within .codespellrc
2+
---
3+
name: Codespell
4+
5+
on:
6+
push:
7+
branches: [master]
8+
pull_request:
9+
branches: [master]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
codespell:
16+
name: Check for spelling errors
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Codespell
23+
uses: codespell-project/actions-codespell@v2

docs/howto/project_structure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This works because the [option](../options.md) `search_page_directory` defaults
3030

3131
## Re-using tables across markdown files
3232

33-
If you want to re-use tables in multiple markdown files, you'll want to store them in a central directory, like `docs/assets/tables`.
33+
If you want to reuse tables in multiple markdown files, you'll want to store them in a central directory, like `docs/assets/tables`.
3434
That way, if you restructure your navigation, the links to the tables won't break either.
3535
It's also great if you generate tables because the output directory will be the same.
3636

@@ -57,7 +57,7 @@ In `page.md`, to read `basic_table.csv`, you can choose to use:
5757

5858
## A central table directory combined with same-directory tables
5959

60-
If you have some central tables that you want to re-use, and some tables that are specific to a page, you could use the following project structure:
60+
If you have some central tables that you want to reuse, and some tables that are specific to a page, you could use the following project structure:
6161

6262
```nohighlight
6363
.

mkdocs_table_reader_plugin/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ def on_page_markdown(self, markdown, page, config, files, **kwargs):
126126
markdown_table = fix_indentation(leading_spaces, markdown_table)
127127

128128
# Insert markdown table
129-
# By replacing only the first occurance of the regex pattern
129+
# By replacing only the first occurrence of the regex pattern
130130
# You might insert multiple CSVs with a single reader like read_csv
131-
# Because of the replacement, the next occurance will be the first match for .sub() again.
131+
# Because of the replacement, the next occurrence will be the first match for .sub() again.
132132
# This is always why when allow_missing_files=True we replaced the input tag.
133133
markdown = tag_pattern.sub(markdown_table, markdown, count=1)
134134

0 commit comments

Comments
 (0)