Repository: mondeja/mkdocs-include-markdown-plugin (python)

Issue:
Turn off comments by default
There are some cases when including with `comments` enabled breaks the content. At least:

- #192

Might be worth to change the default value to `false`. I think that so much people doesn't even know that there are comments added by default and are not worth if they are breaking some includes.

Pull request:
Set `comments=false` as default for `include-markdown` directive
Closes #194

Patch:
diff --git a/README.md b/README.md
index 2719bdd..726c1cb 100644
--- a/README.md
+++ b/README.md
@@ -168,10 +168,10 @@ content to include.
   are rewritten to work correctly in their new location. Possible values are
   `true` and `false`.
 - <a name="include-markdown_comments" href="#include-markdown_comments">#</a>
-  **comments** (_true_): When this option is enabled (default), the content to
-  include is wrapped by `<!-- BEGIN INCLUDE -->` and `<!-- END INCLUDE -->`
-  comments which help to identify that the content has been included. Possible
-  values are `true` and `false`.
+  **comments** (_false_): When this option is enabled, the content to include
+  is wrapped by `<!-- BEGIN INCLUDE -->` and `<!-- END INCLUDE -->` comments
+  which help to identify that the content has been included. Possible values
+  are `true` and `false`.
 - <a name="include-markdown_heading-offset" href="#include-markdown_heading-offset">#</a>
   **heading-offset** (0): Increases or decreases the Markdown headings depth
   by this number. Only supports number sign (`#`) heading syntax. Accepts
@@ -193,7 +193,7 @@ content to include.
     start='<!--\n\ttable-start\n-->'
     end='<!--\n\ttable-end\n-->'
     rewrite-relative-urls=false
-    comments=false
+    comments=true
 %}
 ```
 
diff --git a/examples/custom-tags/docs/index.md b/examples/custom-tags/docs/index.md
index fe9025f..23d57bf 100644
--- a/examples/custom-tags/docs/index.md
+++ b/examples/custom-tags/docs/index.md
@@ -2,7 +2,7 @@
 
 |>
 include-markdown "./included.md"
-comments=false
+comments=true
 <|
 
 |> include './included.md' <|
diff --git a/examples/start-end-not-found-warnings/docs/index.md b/examples/start-end-not-found-warnings/docs/index.md
index f28f751..e459be8 100644
--- a/examples/start-end-not-found-warnings/docs/index.md
+++ b/examples/start-end-not-found-warnings/docs/index.md
@@ -4,11 +4,11 @@
   include-markdown "./included.md"
   start="<--start-->"
   end="<--end-->"
-  comments=false
 %}
 
 {%
   include './included.md'
   start="<--start-->"
   end="<--end-->"
+  comments=true
 %}
diff --git a/examples/table-as-list-item/docs/index.md b/examples/table-as-list-item/docs/index.md
index f76c54d..44959c5 100644
--- a/examples/table-as-list-item/docs/index.md
+++ b/examples/table-as-list-item/docs/index.md
@@ -5,7 +5,6 @@
 
    {%
      include-markdown "./table.md"
-     comments=false
    %}
 
 1. Another list entry
diff --git a/locale/es/README.md b/locale/es/README.md
index ce00043..b167809 100644
--- a/locale/es/README.md
+++ b/locale/es/README.md
@@ -159,8 +159,8 @@ imágenes Markdown en el contenido que están definidas mediante una URL relativ
 son rescritos para funcionar correctamente en su nueva localización. Los valores
 posibles son `true` y `false`.
 - <a name="include-markdown_comments" href="#include-markdown_comments">#</a>
-**comments** (*true*): Cuando esta opción está habilitada (por defecto), el
-contenido a incluir es envuelto por comentarios `<!-- BEGIN INCLUDE -->` y
+**comments** (*false*): Cuando esta opción está habilitada, el contenido a
+incluir es envuelto por comentarios `<!-- BEGIN INCLUDE -->` y
 `<!-- END INCLUDE -->` que ayudan a identificar que el contenido ha sido
 incluido. Los valores posibles son `true` y `false`.
 - <a name="include-markdown_heading-offset"
@@ -185,7 +185,7 @@ especificado. Sólo soporta la sintaxis de encabezado de caracteres de hash
     start='<!--\n\ttable-start\n-->'
     end='<!--\n\ttable-end\n-->'
     rewrite-relative-urls=false
-    comments=false
+    comments=true
 %}
 ```
 
diff --git a/locale/es/README.md.po b/locale/es/README.md.po
index 231f25f..df818d5 100644
--- a/locale/es/README.md.po
+++ b/locale/es/README.md.po
@@ -137,17 +137,16 @@ msgstr ""
 
 msgid ""
 "<a name=\"include-markdown_comments\" href=\"#include-"
-"markdown_comments\">#</a> **comments** (*true*): When this option is enabled"
-" (default), the content to include is wrapped by `<!-- BEGIN INCLUDE -->` "
-"and `<!-- END INCLUDE -->` comments which help to identify that the content "
-"has been included. Possible values are `true` and `false`."
+"markdown_comments\">#</a> **comments** (*false*): When this option is "
+"enabled, the content to include is wrapped by `<!-- BEGIN INCLUDE -->` and "
+"`<!-- END INCLUDE -->` comments which help to identify that the content has "
+"been included. Possible values are `true` and `false`."
 msgstr ""
 "<a name=\"include-markdown_comments\" href=\"#include-"
-"markdown_comments\">#</a> **comments** (*true*): Cuando esta opción está "
-"habilitada (por defecto), el contenido a incluir es envuelto por comentarios"
-" `<!-- BEGIN INCLUDE -->` y `<!-- END INCLUDE -->` que ayudan a identificar "
-"que el contenido ha sido incluido. Los valores posibles son `true` y "
-"`false`."
+"markdown_comments\">#</a> **comments** (*false*): Cuando esta opción está "
+"habilitada, el contenido a incluir es envuelto por comentarios `<!-- BEGIN "
+"INCLUDE -->` y `<!-- END INCLUDE -->` que ayudan a identificar que el "
+"contenido ha sido incluido. Los valores posibles son `true` y `false`."
 
 msgid ""
 "<a name=\"include-markdown_heading-offset\" href=\"#include-"
diff --git a/locale/fr/README.md b/locale/fr/README.md
index 929523a..2671139 100644
--- a/locale/fr/README.md
+++ b/locale/fr/README.md
@@ -159,10 +159,10 @@ Markdown dans le contenu qui sont spécifiés par une URL relative sont réécri
 pour fonctionner correctement dans leur nouvel emplacement. Les valeurs
 possibles sont `true` et `false`.
 - <a name="include-markdown_comments" href="#include-markdown_comments">#</a>
-**comments** (*true*): Lorsque cette option est activée (par défaut), le
-contenu à inclure est entouré de `<!-- BEGIN INCLUDE -->` et
-`<!-- END INCLUDE -->` commentaires qui aident à identifier que le contenu a été
-inclus. Les valeurs possibles sont `true` et `false`.
+**comments** (*false*): Lorsque cette option est activée, le contenu à inclure
+est entouré de `<!-- BEGIN INCLUDE -->` et `<!-- END INCLUDE -->` commentaires
+qui aident à identifier que le contenu a été inclus. Les valeurs possibles sont
+`true` et `false`.
 - <a name="include-markdown_heading-offset"
 href="#include-markdown_heading-offset">#</a> **heading-offset** (0): Augmente
 ou diminue la profondeur des en-têtes Markdown de ce nombre. Ne prend en charge
@@ -185,7 +185,7 @@ négatives pour supprimer les caractères `#` de tête.
     start='<!--\n\ttable-start\n-->'
     end='<!--\n\ttable-end\n-->'
     rewrite-relative-urls=false
-    comments=false
+    comments=true
 %}
 ```
 
diff --git a/locale/fr/README.md.po b/locale/fr/README.md.po
index 0c717b1..17cbe55 100644
--- a/locale/fr/README.md.po
+++ b/locale/fr/README.md.po
@@ -130,16 +130,16 @@ msgstr ""
 
 msgid ""
 "<a name=\"include-markdown_comments\" href=\"#include-"
-"markdown_comments\">#</a> **comments** (*true*): When this option is enabled"
-" (default), the content to include is wrapped by `<!-- BEGIN INCLUDE -->` "
-"and `<!-- END INCLUDE -->` comments which help to identify that the content "
-"has been included. Possible values are `true` and `false`."
+"markdown_comments\">#</a> **comments** (*false*): When this option is "
+"enabled, the content to include is wrapped by `<!-- BEGIN INCLUDE -->` and "
+"`<!-- END INCLUDE -->` comments which help to identify that the content has "
+"been included. Possible values are `true` and `false`."
 msgstr ""
 "<a name=\"include-markdown_comments\" href=\"#include-"
-"markdown_comments\">#</a> **comments** (*true*): Lorsque cette option est "
-"activée (par défaut), le contenu à inclure est entouré de `<!-- BEGIN "
-"INCLUDE -->` et `<!-- END INCLUDE -->` commentaires qui aident à identifier "
-"que le contenu a été inclus. Les valeurs possibles sont `true` et `false`."
+"markdown_comments\">#</a> **comments** (*false*): Lorsque cette option est "
+"activée, le contenu à inclure est entouré de `<!-- BEGIN INCLUDE -->` et "
+"`<!-- END INCLUDE -->` commentaires qui aident à identifier que le contenu a"
+" été inclus. Les valeurs possibles sont `true` et `false`."
 
 msgid ""
 "<a name=\"include-markdown_heading-offset\" href=\"#include-"
diff --git a/lychee.toml b/lychee.toml
index d10c884..eb6895a 100644
--- a/lychee.toml
+++ b/lychee.toml
@@ -5,4 +5,4 @@ exclude = [
   'https://raw\.githubusercontent\.com/mondeja/',
   'https://github.com/user/repo'
 ]
-exclude_path = ["lychee.toml"]
+exclude_path = ["lychee.toml", "^locale"]
diff --git a/src/mkdocs_include_markdown_plugin/config.py b/src/mkdocs_include_markdown_plugin/config.py
index a633428..da8563b 100644
--- a/src/mkdocs_include_markdown_plugin/config.py
+++ b/src/mkdocs_include_markdown_plugin/config.py
@@ -17,7 +17,7 @@ class PluginConfig(Config):  # noqa: D101
     preserve_includer_indent = MkType(bool, default=True)
     dedent = MkType(bool, default=False)
     trailing_newlines = MkType(bool, default=True)
-    comments = MkType(bool, default=True)
+    comments = MkType(bool, default=False)
     rewrite_relative_urls = MkType(bool, default=True)
     heading_offset = MkType(int, default=0)
     start = Optional(MkType(str))


Test patch:
diff --git a/tests/test_integration/test_cache_integration.py b/tests/test_integration/test_cache_integration.py
index ef599aa..527c133 100644
--- a/tests/test_integration/test_cache_integration.py
+++ b/tests/test_integration/test_cache_integration.py
@@ -64,7 +64,6 @@ def test_page_included_by_url_is_cached(
         return on_page_markdown(
             f'''{{%
     {directive} "{url}"
-    comments=false
 %}}''',
             page(tmp_path / 'includer.md'),
             tmp_path,
diff --git a/tests/test_unit/test_arguments.py b/tests/test_unit/test_arguments.py
index 2d0f7b3..0abc1eb 100644
--- a/tests/test_unit/test_arguments.py
+++ b/tests/test_unit/test_arguments.py
@@ -77,14 +77,9 @@ More content that should be ignored
 
     includer_file_content = f'''{{%
   {directive} "{page_to_include_filepath}"
-  comments=false
   start='<!-- "s\\'tar\\'t" -->'
   end="<!-- 'en\\"d' -->"
 %}}'''
-    if directive == 'include':
-        includer_file_content = includer_file_content.replace(
-            'comments=false', '',
-        )
     result = on_page_markdown(
         includer_file_content,
         page(tmp_path / 'includer.md'),
@@ -118,13 +113,8 @@ More content that should be ignored
     includer_file_content = f'''
 {{%
   {directive} "{page_to_include_filepath}"
-  comments=false
   {argument}=''
 %}}'''
-    if directive == 'include':
-        includer_file_content = includer_file_content.replace(
-            'comments=false', '',
-        )
     with pytest.raises(PluginError) as exc:
         on_page_markdown(
             includer_file_content,
@@ -160,13 +150,8 @@ def test_exclude_double_quote_escapes(
     includer_glob = os.path.join(str(drectory_to_include), '*.md')
     includer_file_content = f'''{{%
   {directive} "{includer_glob}"
-  comments=false
   exclude="{page_to_exclude_escaped_filepath}"
 %}}'''
-    if directive == 'include':
-        includer_file_content = includer_file_content.replace(
-            'comments=false', '',
-        )
     result = on_page_markdown(
         includer_file_content,
         page(tmp_path / 'includer.md'),
@@ -193,13 +178,8 @@ def test_invalid_exclude_argument(directive, page, tmp_path, caplog, plugin):
 
     includer_file_content = f'''{{%
   {directive} "{includer_glob}"
-  comments=false
   exclude=
 %}}'''
-    if directive == 'include':
-        includer_file_content = includer_file_content.replace(
-            'comments=false', '',
-        )
 
     with pytest.raises(PluginError) as exc:
         on_page_markdown(
@@ -223,13 +203,8 @@ def test_empty_encoding_argument(directive, page, tmp_path, plugin, caplog):
 
     includer_file_content = f'''{{%
   {directive} "{page_to_include_filepath}"
-  comments=false
   encoding=
 %}}'''
-    if directive == 'include':
-        includer_file_content = includer_file_content.replace(
-            'comments=false', '',
-        )
 
     with pytest.raises(PluginError) as exc:
         on_page_markdown(
@@ -280,7 +255,6 @@ def test_invalid_heading_offset_arguments(
         on_page_markdown(
             f'''{{%
   include-markdown "{page_to_include_filepath}"
-  comments=false
   heading-offset={argument_value}
 %}}''',
             page(tmp_path / 'includer.md'),
@@ -299,13 +273,8 @@ def test_invalid_argument_name(directive, page, tmp_path, plugin, caplog):
 
     includer_file_content = f'''{{%
   {directive} "{page_to_include_filepath}"
-  comments=false
   invalid-argument=true
 %}}'''
-    if directive == 'include':
-        includer_file_content = includer_file_content.replace(
-            'comments=false', '',
-        )
     assert on_page_markdown(
         includer_file_content,
         page(tmp_path / 'includer.md'),
@@ -368,7 +337,6 @@ class TestFilename:
         result = on_page_markdown(
             f'''{{%
   {directive} "{escaped_page_to_include_filepath}"
-  {'comments=false' if directive == 'include-markdown' else ''}
 %}}''',
             page(tmp_path / 'includer.md'),
             tmp_path,
@@ -392,7 +360,6 @@ class TestFilename:
         result = on_page_markdown(
             f'''{{%
   {directive} '{escaped_page_to_include_filepath}'
-  {'comments=false' if directive == 'include-markdown' else ''}
 %}}''',
             page(tmp_path / 'includer.md'),
             tmp_path,
@@ -413,7 +380,6 @@ class TestFilename:
         result = on_page_markdown(
             f'''{{%
   {directive} '{page_to_include_filepath}'
-  {'comments=false' if directive == 'include-markdown' else ''}
 %}}''',
             page(tmp_path / 'includer.md'),
             tmp_path,
@@ -433,7 +399,6 @@ class TestFilename:
         result = on_page_markdown(
             f'''{{%
   {directive} "{page_to_include_filepath}"
-  {'comments=false' if directive == 'include-markdown' else ''}
 %}}''',
             page(tmp_path / 'includer.md'),
             tmp_path,
@@ -476,7 +441,6 @@ class TestFilename:
 
         markdown = f'''{{%
   {directive} {quote}{escaped_page_to_include_filepath}{quote}
-  {'comments=false' if directive == 'include-markdown' else ''}
 %}}'''
 
         func = functools.partial(
diff --git a/tests/test_unit/test_config.py b/tests/test_unit/test_config.py
index adb4ed3..324e86a 100644
--- a/tests/test_unit/test_config.py
+++ b/tests/test_unit/test_config.py
@@ -141,15 +141,15 @@ def _run_test(
         pytest.param(
             '{% include-markdown "{filepath}" %}',
             'foo\n',
-            '<!-- BEGIN INCLUDE {filepath} -->\nfoo\n\n<!-- END INCLUDE -->',
-            {},
+            'foo\n',
+            {'comments': False},
             id='default-comments',
         ),
         pytest.param(
-            '{% include-markdown "{filepath}" %}',
+            '{% include-markdown "{filepath}" comments=true %}',
             'foo\n',
-            'foo\n',
-            {'comments': False},
+            '<!-- BEGIN INCLUDE {filepath} -->\nfoo\n\n<!-- END INCLUDE -->',
+            {},
             id='custom-comments',
         ),
     ),
diff --git a/tests/test_unit/test_encoding.py b/tests/test_unit/test_encoding.py
index 7b125eb..377441f 100644
--- a/tests/test_unit/test_encoding.py
+++ b/tests/test_unit/test_encoding.py
@@ -18,7 +18,6 @@ Content to include
         on_page_markdown(
             f'''{{%
     {directive} "{page_to_include_file}"
-    comments=false
     start='<!-- start -->'
     end="<!-- end -->"
     encoding="ascii"
@@ -43,7 +42,6 @@ Content to include
     result = on_page_markdown(
         f'''{{%
   {directive} "{page_to_include_file}"
-  comments=false
   start="<!-- start -->"
   end="<!-- end -->"
 %}}''',
@@ -68,7 +66,6 @@ Content to include
     result = on_page_markdown(
         f'''{{%
   {directive} "{page_to_include_file}"
-  comments=false
   start='<!-- start -->'
   end="<!-- end -->"
   encoding="utf-8"
diff --git a/tests/test_unit/test_exclude.py b/tests/test_unit/test_exclude.py
index 9f58d47..f0681d5 100644
--- a/tests/test_unit/test_exclude.py
+++ b/tests/test_unit/test_exclude.py
@@ -85,11 +85,7 @@ def test_exclude(
     includer_file_content = f'''{{%
   {directive} "{tmp_path}{os.sep}content/*"
   exclude='{exclude_prefix}{exclude}'
-  comments=false
 %}}'''
-    if directive == 'include':
-        includer_file_content = includer_file_content.replace(
-            'comments=false', '')
     for basename, file in files.items():
         file.write_text(f'{basename}\n')
 
diff --git a/tests/test_unit/test_glob_include.py b/tests/test_unit/test_glob_include.py
index 6406a00..8eedcbf 100644
--- a/tests/test_unit/test_glob_include.py
+++ b/tests/test_unit/test_glob_include.py
@@ -58,14 +58,12 @@ barbaz
   {directive} "./included*.txt"
   start="<!-- start-2 -->"
   end="<!-- end-2 -->"
-  comments=false
 %}
 
 {%
   {directive} "./included*.txt"
   start="<!-- start-1 -->"
   end="<!-- end-1 -->"
-  comments=false
 %}
 ''',
             [],
@@ -75,7 +73,6 @@ barbaz
             '''{%
   {directive} "./included*.txt"
   end="<!-- end-2 -->"
-  comments=false
 %}
 ''',
             [],
@@ -88,21 +85,19 @@ barbaz
   {directive} "./included*.txt"
   start="<!-- start-not-found-2 -->"
   end="<!-- end-not-found-2 -->"
-  comments=false
 %}
 
 {%
   {directive} "./included*.txt"
   start="<!-- start-not-found-1 -->"
   end="<!-- end-not-found-1 -->"
-  comments=false
 %}
 ''',
             [
                 (
                     "Delimiter end '<!-- end-not-found-1 -->'"
                     " of '{directive}' directive"
-                    ' at {includer_file}:10 not detected in'
+                    ' at {includer_file}:9 not detected in'
                     ' the files {included_file_01}, {included_file_02}'
                 ),
                 (
@@ -114,7 +109,7 @@ barbaz
                 (
                     "Delimiter start '<!-- start-not-found-1 -->'"
                     " of '{directive}' directive"
-                    ' at {includer_file}:10 not detected in'
+                    ' at {includer_file}:9 not detected in'
                     ' the files {included_file_01}, {included_file_02}'
                 ),
                 (
@@ -137,9 +132,6 @@ def test_glob_include(
     caplog,
     tmp_path,
 ):
-    if directive == 'include':
-        includer_content = includer_content.replace('comments=false', '')
-
     includer_file = tmp_path / 'includer.txt'
     included_01_file = tmp_path / 'included_01.txt'
     included_02_file = tmp_path / 'included_02.txt'
diff --git a/tests/test_unit/test_include.py b/tests/test_unit/test_include.py
index 2316e0b..2c1bf13 100644
--- a/tests/test_unit/test_include.py
+++ b/tests/test_unit/test_include.py
@@ -102,7 +102,6 @@ This must be included.
   include-markdown "{filepath}"
   start="<!--start-tag-->"
   end="<!--end-tag-->"
-  comments=false
 %}''',
             '''Some text
 
diff --git a/tests/test_unit/test_include_markdown.py b/tests/test_unit/test_include_markdown.py
index 30b6066..e4afbe6 100644
--- a/tests/test_unit/test_include_markdown.py
+++ b/tests/test_unit/test_include_markdown.py
@@ -19,9 +19,7 @@ from mkdocs_include_markdown_plugin.event import on_page_markdown
             'This must be included.',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} -->
 This must be included.
-<!-- END INCLUDE -->
 ''',
             [],
             id='simple case',
@@ -41,10 +39,8 @@ This must be included.
 This must be included.''',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} '&lt;!--start-here--&gt;' '' -->
 
 This must be included.
-<!-- END INCLUDE -->
 ''',
             [],
             id='start',
@@ -64,10 +60,8 @@ This must be included.
 This must be ignored.''',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} '' '&lt;!--end-here--&gt;' -->
 This must be included.
 
-<!-- END INCLUDE -->
 ''',
             [],
             id='end',
@@ -81,6 +75,7 @@ This must be included.
   include-markdown "{filepath}"
   start="<!--start-here-->"
   end="<!--end-here-->"
+  comments=true
 %}
 ''',
             '''This must be ignored.
@@ -108,6 +103,7 @@ This must be included.
   include-markdown "{filepath}"
   start="<!--\\tstart -->"
   end="<!--\\tend -->"
+  comments=true
 %}
 ''',
             '''This must be ignored.
@@ -135,6 +131,7 @@ This must be included.
   include-markdown "{filepath}"
   start="<!--\nstart -->"
   end="<!--\nend -->"
+  comments=true
 %}
 ''',
             '''This must be ignored.
@@ -158,14 +155,11 @@ This must be included.
 
         # Exclude start and end comments
         pytest.param(
-            '''{%
-  include-markdown "{filepath}"
-  comments=false
-%}''',
+            '{% include-markdown "{filepath}" %}',
             '''Foo''',
             '''Foo''',
             [],
-            id='comments=false',
+            id='comments=false (default)',
         ),
 
         # Multiples start and end matchs
@@ -174,7 +168,6 @@ This must be included.
   include-markdown "{filepath}"
   start="<!--start-tag-->"
   end="<!--end-tag-->"
-  comments=false
 %}''',
             '''Some text
 
@@ -214,7 +207,6 @@ This should be included even if hasn't defined after end tag.
             '''1. Ordered list item
     {%
       include-markdown "{filepath}"
-      comments=false
       preserve-includer-indent=false
     %}''',
             '''- Unordered sublist item
@@ -232,7 +224,6 @@ This should be included even if hasn't defined after end tag.
 {%
     include-markdown "{filepath}"
     start="<!--start-->"
-    comments=false
 %}''',
             '''Some text
 
@@ -253,7 +244,6 @@ More text
 {%
     include-markdown "{filepath}"
     end='<!--end-->'
-    comments=false
 %}''',
             '''
 Some text
@@ -274,7 +264,6 @@ Some text
 {%
     include-markdown '{filepath}'
     start='<!--start-->'
-    comments=false
 %}''',
             '''Some text
 ''',
@@ -296,7 +285,6 @@ Some text
 {%
     include-markdown "{filepath}"
     end="<!--end-->"
-    comments=false
 %}''',
             '''
 Some text
@@ -318,10 +306,7 @@ Some text
         # Preserve includer indent
         pytest.param(
             '''1. Ordered list item
-    {%
-      include-markdown "{filepath}"
-      comments=false
-    %}''',
+    {% include-markdown "{filepath}" %}''',
             '''- First unordered sublist item
 - Second unordered sublist item
 - Third unordered sublist item''',
@@ -340,7 +325,6 @@ Some text
       include-markdown "{filepath}"
       preserve-includer-indent=true
       end="<!--end-->"
-      comments=false
       start="<!--start-->"
     %}''',
             '''<!--start-->- First unordered sublist item
@@ -360,7 +344,6 @@ Some text
 {%
   include-markdown "{filepath}"
   dedent=true
-  comments=false
 %}
 ''',
             '''    - Foo
@@ -384,7 +367,6 @@ Some text
       include-markdown "{filepath}"
       dedent=true
       preserve-includer-indent=true
-      comments=false
     %}
 ''',
             '''        - Foo
@@ -414,11 +396,9 @@ Some text
 Example data''',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} -->
 ## This should be a second level heading.
 
 Example data
-<!-- END INCLUDE -->
 ''',
             [],
             id='heading-offset=1',
@@ -436,11 +416,9 @@ Example data
 Example data''',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} -->
 ### This should be a third level heading.
 
 Example data
-<!-- END INCLUDE -->
 ''',
             [],
             id='heading-offset=2',
@@ -459,11 +437,9 @@ Example data
 Example data''',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} -->
 # This should be a first level heading.
 
 Example data
-<!-- END INCLUDE -->
 ''',
             [],
             id='no heading-offset (default)',
@@ -483,11 +459,9 @@ Example data
 Example data''',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} -->
 # This should be a first level heading.
 
 Example data
-<!-- END INCLUDE -->
 ''',
             [],
             id='heading-offset=0',
@@ -507,11 +481,9 @@ Example data
 Example data''',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} -->
 ## This should be a second level heading.
 
 Example data
-<!-- END INCLUDE -->
 ''',
             [],
             id='heading-offset=-2',
@@ -531,11 +503,9 @@ Example data
 Example data''',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} -->
 ''' + '#' * 94 + ''' This should be a 94th level heading.
 
 Example data
-<!-- END INCLUDE -->
 ''',
             [],
             id='heading-offset=90',
@@ -555,11 +525,9 @@ Example data
 Example data''',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} -->
 # This should be a first level heading.
 
 Example data
-<!-- END INCLUDE -->
 ''',
             [],
             id='heading-offset=-90',
@@ -571,6 +539,7 @@ Example data
 
 {%
   include-markdown "https://raw.githubusercontent.com/mondeja/mkdocs-include-markdown-plugin/master/examples/basic/docs/included.md"
+  comments=true
 %}
 
 After include.
@@ -593,7 +562,7 @@ After include.
             id='url',
         ),
 
-        # Custom encoding
+        # UTF-8 characters
         pytest.param(
             '''# Header
 
@@ -615,7 +584,6 @@ vɛвѣди
 ''',
             '''# Header
 
-<!-- BEGIN INCLUDE {filepath} -->
 Тест інклуде
 азъ
 два
@@ -630,7 +598,6 @@ vɛвѣди
 ɡɫɐˈɡolʲɡ/ or /gʲЖж	год god
 ДдД д	дэdɐˈbro
 
-<!-- END INCLUDE -->
 ''',
             [],
             id='russian-characters',
@@ -639,7 +606,7 @@ vɛвѣди
         # Right strip unix trailing newlines
         pytest.param(
             '''1. List item number 1
-1. {% include-markdown "{filepath}" comments=false trailing-newlines=false %}
+1. {% include-markdown "{filepath}" trailing-newlines=false %}
 1. List item number 3
 ''',
             'Content to include\n',
@@ -673,7 +640,7 @@ vɛвѣди
         # Right strip trailing newlines keeping comments
         pytest.param(
             '''1. List item number 1
-1. {% include-markdown "{filepath}" trailing-newlines=false %}
+1. {% include-markdown "{filepath}" trailing-newlines=false comments=true %}
 1. List item number 3
 ''',
             'Content to include\n',
@@ -690,6 +657,7 @@ vɛвѣди
 1. {%
   include-markdown "{filepath}"
   trailing-newlines=false
+  comments=true
 %}
 1. List item number 3
 ''',
@@ -705,7 +673,9 @@ vɛвѣди
         pytest.param(
             (
                 "{% include-markdown \"{filepath}\""
-                " start='<!--start-\\'including-->' %}"
+                " start='<!--start-\\'including-->'"
+                " comments=true"
+                " %}"
             ),
             '''Ignored content
 
@@ -726,6 +696,7 @@ Content to include
 
 1.  {%
        include-markdown "{filepath}"
+       comments=true
     %}
 
 1.  If everything works as expected this should be number 3
@@ -836,6 +807,7 @@ def test_include_markdown_relative_rewrite(
     include-markdown "./docs/page.md"
     start="<!--start-->"
     end="<!--end-->"
+    comments=true
     {option_value}
 %}}
 ''',
@@ -902,14 +874,12 @@ def test_multiple_includes(page, tmp_path, plugin):
 
 {{%
   include-markdown "{snippet_filepath}"
-  comments=false
 %}}
 
 # Heading 2
 
 {{%
   include-markdown "{another_filepath}"
-  comments=false
 %}}
 
 # Heading 3
diff --git a/tests/test_unit/test_logging.py b/tests/test_unit/test_logging.py
index cb180d1..ff9ef78 100644
--- a/tests/test_unit/test_logging.py
+++ b/tests/test_unit/test_logging.py
@@ -25,7 +25,6 @@ def test_start_end_arguments_not_found(
 
 {{%
   {directive} "{included_file}"
-  comments=false
   start="<!--start-->"
   end="<!--end-->"
 %}}
diff --git a/tests/test_unit/test_nested_includes.py b/tests/test_unit/test_nested_includes.py
index d157b01..4f7f175 100644
--- a/tests/test_unit/test_nested_includes.py
+++ b/tests/test_unit/test_nested_includes.py
@@ -20,13 +20,11 @@ from mkdocs_include_markdown_plugin.event import on_page_markdown
 
 {%
   include-markdown "{filepath}"
-  comments=false
 %}''',
             '''Some text from second includer.
 
 {%
   include-markdown "{filepath}"
-  comments=false
 %}
 ''',
             '''Some test from final included.''',
@@ -46,7 +44,6 @@ Some test from final included.
 
 {%
   include-markdown "{filepath}"
-  comments=false
 %}''',
             '''Some text from second includer.
 
@@ -102,7 +99,6 @@ Some test from final included.
   include-markdown "{filepath}"
   start="<!-- start -->"
   end="<!-- end -->"
-  comments=false
 %}
 ''',
             '''This must be ignored
@@ -127,14 +123,12 @@ Some test from final included.
 {%
   include-markdown "{filepath}"
   heading-offset=1
-  comments=false
 %}''',
             '''# Header 2
 
 {%
   include-markdown "{filepath}"
   heading-offset=1
-  comments=false
 %}
 ''',
             '''# Header 3
@@ -156,7 +150,6 @@ Some test from final included.
 
 {%
   include-markdown '{filepath}'
-  comments=false
   start="<!--start-->"
   end="<!--end-->"
 %}''',
@@ -190,13 +183,11 @@ Some test from final included.
 
 {%
   include-markdown "{filepath}"
-  comments=false
 %}''',
             '''# Header 2
 
 {%
   include-markdown "{filepath}"
-  comments=false
   start="<!--start-->"
   end="<!--end-->"
 %}''',
@@ -258,7 +249,6 @@ This content must not be included.
 {%
   include-markdown "{filepath}"
   recursive=false
-  comments=false
 %}''',
             '''# Header 2
 
@@ -345,7 +335,6 @@ def test_nested_include_relpath(page, tmp_path, plugin):
 
 {%
   include-markdown "./docs/second-includer.txt"
-  comments=false
 %}
 '''
     first_includer_file.write_text(first_includer_content)
@@ -354,7 +343,6 @@ def test_nested_include_relpath(page, tmp_path, plugin):
 
 {%
   include-markdown "../included.txt"
-  comments=false
 %}
 '''
     second_includer_file.write_text(second_includer_content)