Python pygments.filters.get_filter_by_name() Examples

The following are 9 code examples of pygments.filters.get_filter_by_name(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pygments.filters , or try the search function .
Example #1
Source File: lexer.py    From pigaios with GNU General Public License v3.0 5 votes vote down vote up
def add_filter(self, filter_, **options):
        """
        Add a new stream filter to this lexer.
        """
        if not isinstance(filter_, Filter):
            filter_ = get_filter_by_name(filter_, **options)
        self.filters.append(filter_) 
Example #2
Source File: lexer.py    From pySINDy with MIT License 5 votes vote down vote up
def add_filter(self, filter_, **options):
        """
        Add a new stream filter to this lexer.
        """
        if not isinstance(filter_, Filter):
            filter_ = get_filter_by_name(filter_, **options)
        self.filters.append(filter_) 
Example #3
Source File: lexer.py    From pygments with BSD 2-Clause "Simplified" License 5 votes vote down vote up
def add_filter(self, filter_, **options):
        """
        Add a new stream filter to this lexer.
        """
        if not isinstance(filter_, Filter):
            filter_ = get_filter_by_name(filter_, **options)
        self.filters.append(filter_) 
Example #4
Source File: lexer.py    From komodo-wakatime with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def add_filter(self, filter_, **options):
        """
        Add a new stream filter to this lexer.
        """
        if not isinstance(filter_, Filter):
            filter_ = get_filter_by_name(filter_, **options)
        self.filters.append(filter_) 
Example #5
Source File: lexer.py    From Carnets with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def add_filter(self, filter_, **options):
        """
        Add a new stream filter to this lexer.
        """
        if not isinstance(filter_, Filter):
            filter_ = get_filter_by_name(filter_, **options)
        self.filters.append(filter_) 
Example #6
Source File: lexer.py    From V1EngineeringInc-Docs with Creative Commons Attribution Share Alike 4.0 International 5 votes vote down vote up
def add_filter(self, filter_, **options):
        """
        Add a new stream filter to this lexer.
        """
        if not isinstance(filter_, Filter):
            filter_ = get_filter_by_name(filter_, **options)
        self.filters.append(filter_) 
Example #7
Source File: lexer.py    From diaphora with GNU Affero General Public License v3.0 5 votes vote down vote up
def add_filter(self, filter_, **options):
        """
        Add a new stream filter to this lexer.
        """
        if not isinstance(filter_, Filter):
            filter_ = get_filter_by_name(filter_, **options)
        self.filters.append(filter_) 
Example #8
Source File: lexer.py    From android_universal with MIT License 5 votes vote down vote up
def add_filter(self, filter_, **options):
        """
        Add a new stream filter to this lexer.
        """
        if not isinstance(filter_, Filter):
            filter_ = get_filter_by_name(filter_, **options)
        self.filters.append(filter_) 
Example #9
Source File: lexer.py    From syntax-highlighting with GNU Affero General Public License v3.0 5 votes vote down vote up
def add_filter(self, filter_, **options):
        """
        Add a new stream filter to this lexer.
        """
        if not isinstance(filter_, Filter):
            filter_ = get_filter_by_name(filter_, **options)
        self.filters.append(filter_)