--- hide: - navigation --- # Preprocessor (/root/CORE/Preprocessor) The **Preprocessor** parses tags and is responsible for formatting text. ## Tags *(these can be used in log messages too!)* All tags can be escaped by adding `esc_` before the tag name, if you want to do that. Example: ```text Raw: Output: ``` ### No process `` - end tag `no` - description `Disables preprocessing completely. Doesn't even display the prefix.` - example: ``` text Raw: This is atest MESSage. Output: This is atest MESSage. ``` ### Newline `` - end tag `no` - description `Makes a newline while respecting the prefix. Is much recommended over "\n".` - example (with prefix `prefix_`): ``` text Raw: Very nice message!Here's another message :) Output: prefix_Very nice message! Here's another message :) ``` ### Lowercase `` - end tag `yes` - description `Makes your text lowercase.` - example: ``` text Raw: Did you FiNd THAT funny? Output: Did you find thaT funny? ``` ### Uppercase `` - end tag `yes` - description `Makes your text uppercase.` - example: ``` text Raw: ThiS TeXT should be UPPercaSED Output: ThiS TeXT SHOULD BE UPPERcaSED ``` ### Camelcase `` - end tag `yes` - description `Makes your text camelcase.` - example: ``` text Raw: This text should be CamelCased. Output: This textShouldBeCamelCased. ``` ### Pascalcase `` - end tag `yes` - description `Makes your text pascalcase.` - example: ``` text Raw: This text should be PascelCased. Output: This TextShouldBePascelCased. ``` ### Snakecase `` - end tag `yes` - description `Makes your text snakecase.` - example: ``` text Raw: This text should be SnakeCased. Output: This text_should_be_snake_cased. ``` ## Methods ### process() - returns `String` - description `Formats a message` - argument `msg` - type `String` - mandatory `yes` - description `The message used for processing` - argument `prefix` - type `String` - mandatory `yes` - description `The prefix used for newlines` - argument `pre_msg` - type `String` - mandatory `no, default value is ""` - description `Inserted before the message` - argument `post_msg` - type `String` - mandatory `no, default value is ""` - description `Inserted after the message` - argument `exclusion_filter` - type `Array` - mandatory `no, default value is []` - description `Removes specific Strings from the prefix (used in calculating spaces when using )`