mkdocs-include-markdown-plugin 6.0.4__py3-none-any.whl → 6.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -444,8 +444,8 @@ def get_file_content( # noqa: PLR0913, PLR0915
444
444
  arguments_string,
445
445
  )
446
446
  if offset_match:
447
- offset = offset_match[1]
448
- if offset == '':
447
+ offset_raw_value = offset_match[1]
448
+ if offset_raw_value == '':
449
449
  lineno = lineno_from_content_start(
450
450
  markdown,
451
451
  directive_match_start,
@@ -456,15 +456,15 @@ def get_file_content( # noqa: PLR0913, PLR0915
456
456
  f' {os.path.relpath(page_src_path, docs_dir)}:{lineno}',
457
457
  )
458
458
  try:
459
- offset = int(offset)
459
+ offset = int(offset_raw_value)
460
460
  except ValueError:
461
461
  lineno = lineno_from_content_start(
462
462
  markdown,
463
463
  directive_match_start,
464
464
  )
465
465
  raise PluginError(
466
- f"Invalid 'heading-offset' argument \"{offset}\" in"
467
- " 'include-markdown' directive at "
466
+ f"Invalid 'heading-offset' argument \"{offset_raw_value}\""
467
+ " in 'include-markdown' directive at "
468
468
  f'{os.path.relpath(page_src_path, docs_dir)}:{lineno}',
469
469
  ) from None
470
470
  else:
@@ -556,7 +556,7 @@ def get_file_content( # noqa: PLR0913, PLR0915
556
556
  )
557
557
  )
558
558
 
559
- if offset_match:
559
+ if offset:
560
560
  new_text_to_include = process.increase_headings_offset(
561
561
  new_text_to_include,
562
562
  offset=offset + cumulative_heading_offset,
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: mkdocs-include-markdown-plugin
3
- Version: 6.0.4
3
+ Version: 6.0.5
4
4
  Summary: Mkdocs Markdown includer plugin.
5
5
  Project-URL: Source, https://github.com/mondeja/mkdocs-include-markdown-plugin
6
6
  Project-URL: Documentation, https://github.com/mondeja/mkdocs-include-markdown-plugin#documentation
@@ -96,46 +96,51 @@ plugins:
96
96
  end: <!--end-->
97
97
  ```
98
98
 
99
- - <a name="config_tags" href="#config_tags">#</a> **opening_tag** and
100
- **closing_tag**: The default opening and closing tags. By default are
101
- `{%` and `%}`.
102
-
103
- ```yaml
104
- plugins:
105
- - include-markdown:
106
- opening_tag: "{!"
107
- closing_tag: "!}"
108
- ```
109
-
110
- - <a name="config_exclude" href="#config_exclude">#</a> **exclude**: Define
111
- global exclusion wildcard patterns. Relative paths defined here will be
112
- relative to the _docs/_ directory.
113
-
114
- ```yaml
115
- plugins:
116
- - include-markdown:
117
- exclude:
118
- - LICENSE.md
119
- - api/**
120
- ```
121
-
122
- - <a name="config_cache" href="#config_cache">#</a> **cache**: Define a
123
- expiration time in seconds for cached HTTP requests when including
124
- from URLs.
125
-
126
- ```yaml
127
- plugins:
128
- - include-markdown:
129
- cache: 600
130
- ```
131
-
132
- In order to use this feature, the dependency [platformdirs] must be installed.
133
- You can include it in the installation of the plugin adding the `cache` extra:
134
-
135
- ```txt
136
- # requirements.txt
137
- mkdocs-include-markdown-plugin[cache]
138
- ```
99
+ #### `opening_tag` and `closing_tag`
100
+
101
+ Default opening and closing tags. When not specified they are `{%` and `%}`.
102
+
103
+ ```yaml
104
+ plugins:
105
+ - include-markdown:
106
+ opening_tag: "{!"
107
+ closing_tag: "!}"
108
+ ```
109
+
110
+ <!-- mdpo-disable-next-line -->
111
+
112
+ #### `exclude`
113
+
114
+ Global exclusion wildcard patterns. Relative paths defined here will be
115
+ relative to the [`docs_dir`] directory.
116
+
117
+ ```yaml
118
+ plugins:
119
+ - include-markdown:
120
+ exclude:
121
+ - LICENSE.md
122
+ - api/**
123
+ ```
124
+
125
+ <!-- mdpo-disable-next-line -->
126
+
127
+ #### `cache`
128
+
129
+ Expiration time in seconds for cached HTTP requests when including from URLs.
130
+
131
+ ```yaml
132
+ plugins:
133
+ - include-markdown:
134
+ cache: 600
135
+ ```
136
+
137
+ In order to use this feature, the dependency [platformdirs] must be installed.
138
+ You can include it in the installation of the plugin adding the `cache` extra:
139
+
140
+ ```txt
141
+ # requirements.txt
142
+ mkdocs-include-markdown-plugin[cache]
143
+ ```
139
144
 
140
145
  ### Reference
141
146
 
@@ -148,7 +153,9 @@ Paths of included files can be either:
148
153
  - Local files:
149
154
  - Absolute paths (starting with a path separator).
150
155
  - Relative from the file that includes them (starting with `./` or `../`).
151
- - Relative from the _docs/_ directory.
156
+ - Relative to the [`docs_dir`] directory. For instance if your `docs_dir` is
157
+ _./docs/_, then `includes/header.md` will match the file
158
+ _./docs/includes/header.md_.
152
159
  - [Bash wildcard globs] matching multiple local files.
153
160
 
154
161
  File paths to include and string arguments can be wrapped by double `"` or
@@ -212,7 +219,7 @@ content to include.
212
219
 
213
220
  ```jinja
214
221
  {%
215
- include-markdown 'docs/includes/header.md'
222
+ include-markdown 'includes/header.md'
216
223
  start='<!--\n\ttable-start\n-->'
217
224
  end='<!--\n\ttable-end\n-->'
218
225
  rewrite-relative-urls=false
@@ -222,7 +229,7 @@ content to include.
222
229
 
223
230
  ```jinja
224
231
  {%
225
- include-markdown "docs/includes/header.md"
232
+ include-markdown "includes/header.md"
226
233
  heading-offset=1
227
234
  %}
228
235
  ```
@@ -303,6 +310,10 @@ Includes the content of a file or a group of files.
303
310
  [giving me the permissions][cibuildwheel-470] to separate this plugin from the
304
311
  documentation of [cibuildwheel][cibuildwheel-repo-link].
305
312
 
313
+ [Bash wildcard globs]: https://facelessuser.github.io/wcmatch/glob/#syntax
314
+
315
+ <!-- mdpo-disable -->
316
+
306
317
  [pypi-link]: https://pypi.org/project/mkdocs-include-markdown-plugin
307
318
  [pypi-version-badge-link]: https://img.shields.io/pypi/v/mkdocs-include-markdown-plugin?logo=pypi&logoColor=white
308
319
  [tests-image]: https://img.shields.io/github/actions/workflow/status/mondeja/mkdocs-include-markdown-plugin/ci.yml?logo=github&label=tests&branch=master
@@ -316,4 +327,4 @@ Includes the content of a file or a group of files.
316
327
  [cibuildwheel-repo-link]: https://github.com/pypa/cibuildwheel
317
328
  [es-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/es/README.md
318
329
  [fr-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/fr/README.md
319
- [Bash wildcard globs]: https://facelessuser.github.io/wcmatch/glob/#syntax
330
+ [`docs_dir`]: https://www.mkdocs.org/user-guide/configuration/#docs_dir
@@ -2,13 +2,13 @@ mkdocs_include_markdown_plugin/__init__.py,sha256=ByOde15RQSHlZTmkepPSzIt0GzUIv_
2
2
  mkdocs_include_markdown_plugin/cache.py,sha256=2CAVNwDUHilY1-x1VMLw33hxv76z1wcpid22jTyoJyI,2784
3
3
  mkdocs_include_markdown_plugin/config.py,sha256=qySvva9IBKtnyDEpbYeeXI0HiJ8ONhkVmxEIErW__f0,818
4
4
  mkdocs_include_markdown_plugin/directive.py,sha256=Vva7wW2vUc3OUz6NZzlIjzlFCx-YRsD70U4Jdvghomo,7441
5
- mkdocs_include_markdown_plugin/event.py,sha256=vPPsIThDHHlxVKUeXwutb2_XEDtNVZZEA09h246RsG0,22929
5
+ mkdocs_include_markdown_plugin/event.py,sha256=xG-Cc-NnDCKrinL6n3rtjTNO0z4GK5WCZL4QmnknHRg,22963
6
6
  mkdocs_include_markdown_plugin/files_watcher.py,sha256=hu-63u8syl00mXP59vP_iqD7T1R9iU9JjiZOHDV5fas,298
7
7
  mkdocs_include_markdown_plugin/plugin.py,sha256=bnJCikomoNQlMhKbaK__wKXrd-wYssfTzhzLzCrWd5c,3829
8
8
  mkdocs_include_markdown_plugin/process.py,sha256=uifgQdkn3lmAmztdEZK4LdaTNzEevx_jl0n3jQWIgWc,14404
9
9
  mkdocs_include_markdown_plugin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- mkdocs_include_markdown_plugin-6.0.4.dist-info/METADATA,sha256=DDFGZ3UoPUsYHo2HDeaiRf6W9yGaa25rTjZTDRgJ_Cw,11087
11
- mkdocs_include_markdown_plugin-6.0.4.dist-info/WHEEL,sha256=9QBuHhg6FNW7lppboF2vKVbCGTVzsFykgRQjjlajrhA,87
12
- mkdocs_include_markdown_plugin-6.0.4.dist-info/entry_points.txt,sha256=WEL5m7sw5ZMBwmdOs5S_9mGoZfLCaUDPkDKw7CUk16Q,96
13
- mkdocs_include_markdown_plugin-6.0.4.dist-info/licenses/LICENSE,sha256=d3MolmZ_-5-o5EvHFp6u0NWmwOcygLKa1TAnUB1fr8k,11365
14
- mkdocs_include_markdown_plugin-6.0.4.dist-info/RECORD,,
10
+ mkdocs_include_markdown_plugin-6.0.5.dist-info/METADATA,sha256=VcFeSqQDP1AK5kJ_6ghpRrwlY15JmjSpglEyaoQDJ5E,11158
11
+ mkdocs_include_markdown_plugin-6.0.5.dist-info/WHEEL,sha256=uNdcs2TADwSd5pVaP0Z_kcjcvvTUklh2S7bxZMF8Uj0,87
12
+ mkdocs_include_markdown_plugin-6.0.5.dist-info/entry_points.txt,sha256=WEL5m7sw5ZMBwmdOs5S_9mGoZfLCaUDPkDKw7CUk16Q,96
13
+ mkdocs_include_markdown_plugin-6.0.5.dist-info/licenses/LICENSE,sha256=OunyKlPxiuvLB3ENbo2nyV-OPndkwzyZ5Gzwei0ofbc,11365
14
+ mkdocs_include_markdown_plugin-6.0.5.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.18.0
2
+ Generator: hatchling 1.22.4
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -187,7 +187,7 @@
187
187
  same "printed page" as the copyright notice for easier
188
188
  identification within third-party archives.
189
189
 
190
- Copyright 2017-2023 Joe Rickerby and contributors
190
+ Copyright 2017-2024 Joe Rickerby and contributors
191
191
 
192
192
  Licensed under the Apache License, Version 2.0 (the "License");
193
193
  you may not use this file except in compliance with the License.