Skip to content

Instantly share code, notes, and snippets.

@takahi-i
Last active May 27, 2016 02:17
Show Gist options
  • Save takahi-i/fb1b7a2ea0e052d7985cea1e0bc82309 to your computer and use it in GitHub Desktop.
Save takahi-i/fb1b7a2ea0e052d7985cea1e0bc82309 to your computer and use it in GitHub Desktop.

Suppress RedPen errors with annotation

Writers want to suppress errors from RedPen. In such cases, writers list up the error types they want to suppress. The list of the errors are written down to the beginning of sections or paragraphs where they want to suppress the spcified errors.

The following is a sample of AsciiDoc section which suppress two error types. In the section, the specified errors are suppressed even when RedPen detect errors.

//@Suppress@ SuccessiveWord InvalidExpression
= Section 1
This is is section one yeah.

As we see, the list of the errors are written in the comment just before the seciton and annotation, @Suppress@ is added before the list of errors.

Supported format

The suppression is supported with AsciiDoc and Re:VIEW formats.

@takahi-i
Copy link
Author

takahi-i commented May 12, 2016

It looks that AsciiDoc support attributes before paragraphs.

http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#paragraphs

We will change the annotation style for AsciiDoc following your advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment