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

Ability to disable rules inline or for a section of text #280

Closed
dvaerum opened this issue Oct 27, 2023 · 1 comment
Closed

Ability to disable rules inline or for a section of text #280

dvaerum opened this issue Oct 27, 2023 · 1 comment
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature

Comments

@dvaerum
Copy link

dvaerum commented Oct 27, 2023

Is your feature request related to a problem? Please describe.
I frustrated me that I cannot disable simple rules for sections of text.
Occasionally, I would like to be able to disable/enable some rules while keeping others.

\begin{enumerate}
    \item Turn on the AP host (laptop).

    \item Login with \todo{Add the missing name and password} the username
    % LTeX: enabled=false
    \textbf{cisco}
    % LTeX: enabled=true
    and password \textbf{Password01}.

    \item Enter the folder
\end{enumerate}

In this example, LTeX keeps saying that and in and password is breaking the rule UPPERCASE_SENTENCE_START and that the sentence should start with an uppercase letter.

Describe the solution you'd like
Can we implement a “Magic Comments” which allow one to disable and enable rules, something like this?

% LTeX: disabledRules=[UPPERCASE_SENTENCE_START]
% LTeX: enableRules=[UPPERCASE_SENTENCE_START]

Describe alternatives you've considered
The only other alternative I know of is to mark it as a false positive

Additional context
It would also be nice if the “Magic Comments” could work on X number of lines following the “Magic Comments”.

Example:
I want to disable LTeX for the next line, so I write LTeX(1):. If I wanted it to be disabled for the next 3 lines, I would write it as LTeX(3):

Here is a sample of my previous example rewrite as it would have been if this feature existed

% LTeX(1): enabled=false
\textbf{cisco}
and password \textbf{Password01}.
@dvaerum dvaerum added the 1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature label Oct 27, 2023
@dvaerum
Copy link
Author

dvaerum commented Oct 27, 2023

Just found this feature request
#271
and mine is basically a duplication of it

@dvaerum dvaerum closed this as completed Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature
Projects
None yet
Development

No branches or pull requests

1 participant