Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore a file or subsection within file. #27

Open
cmdallas opened this issue Mar 21, 2023 · 0 comments
Open

Ignore a file or subsection within file. #27

cmdallas opened this issue Mar 21, 2023 · 0 comments

Comments

@cmdallas
Copy link

First off, thanks for this highly useful tool!

Is it possible to ignore a file or add inline directives to ignore sections?

Here is some example content I have in a file:

   <script>
     $(document).ready(function() {
       $('.cs').parent().parent().addClass('coming-soon');
       $('.no').parent().parent().addClass('not-supported');
       $('.yes').parent().parent().addClass('supported');
     });
   </script>
   <style>
      .not-supported {background-color:#f2ada0;}
      .supported {background-color:#f2f8f0;}
      .coming-soon {background-color:#f1faff;}
   </style>

+----------------------------------------+-------------------+-----------------------+
| xxxxxxxx xxxx                          | xxxxxx xxxxxxx    | xxxxxx xxxxxxx        |
+========================================+===================+=======================+
| XXX                                    | :yes:`Yes`        | :yes:`Yes`            |
+----------------------------------------+-------------------+-----------------------+

When running rstfmt I get the following error: docutils.utils.SystemMessage: :46: (ERROR/3) Unknown interpreted text role "yes".
I know I am doing some weird stuff here. So ideally I'd be able to ignore this file when running rstfmt on a directory. Or add inline directives like .. rstfmt-ignore-start xyz .. rstfmt-ignore-end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant