How to use the jsbeautifier.cssbeautifier.css.options.BeautifierOptions function in jsbeautifier

To help you get started, we’ve selected a few jsbeautifier examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Masood-M / yalih / jsbeautifier / cssbeautifier / css / beautifier.py View on Github external
# in python they are the same, different methods are called on them
        # IMPORTANT: This string must be run through six to handle \u chars
        self.lineBreak = re.compile(six.u(r"\r\n|[\n\r]"))
        self.allLineBreaks = self.lineBreak

        self.comment_pattern = re.compile(
            six.u(r"\/\/(?:[^\n\r\u2028\u2029]*)"))
        self.block_comment_pattern = re.compile(
            r"\/\*(?:[\s\S]*?)((?:\*\/)|$)")

        if not source_text:
            source_text = ''

        self.__source_text = source_text

        self._options = BeautifierOptions(opts)
        self._input = None
        self._ch = None

        self._indentLevel = 0
        self._nestedLevel = 0
        self._output = None

        # https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule
        # also in CONDITIONAL_GROUP_RULE below
        self.NESTED_AT_RULE = {
            "@page",
            "@font-face",
            "@keyframes",
            "@media",
            "@supports",
            "@document"}