<commit_before>module Sass
  module SCSS
    module RX
      def self.quote(str, flags = 0)
        Regexp.new(Regexp.quote(str), flags)
      end

      H        = /[0-9a-f]/i
      NL       = /\n|\r\n|\r|\f/
      NONASCII = /[\200-\377]/
      UNICODE  = /\\#{H}{1,6}[ \t\r\n\f]?/
      ESCAPE   = /#{UNICODE}|\\[ -~\200-\377]/
      NMSTART  = /[a-z]|#{NONASCII}|#{ESCAPE}/i
      NMCHAR   = /[a-z0-9_-]|#{NONASCII}|#{ESCAPE}/i
      STRING1  = /\"([\t !#%$&(-~]|\\#{NL}|\'|#{NONASCII}|#{ESCAPE})*\"/
      STRING2  = /\'([\t !#%$&(-~]|\\#{NL}|\"|#{NONASCII}|#{ESCAPE})*\'/

      IDENT    = /[-_]?#{NMSTART}#{NMCHAR}*/
      NAME     = /#{NMCHAR}+/
      NUM      = /[0-9]+|[0-9]*.[0-9]+/
      STRING   = /#{STRING1}|#{STRING2}/
      URL      = /([!#%$&*-~]|#{NONASCII}|#{ESCAPE})*/
      W        = /[ \t\r\n\f]*/
      RANGE    = /\?{1,6}|#{H}(\?{0,5}|#{H}(\?{0,4}|#{H}(\?{0,3}|#{H}(\?{0,2}|#{H}(\??|#{H})))))/

      ##

      S = /[ \t\r\n\f]+/

      COMMENT = /\/\*[^*]*\*+([^\/][^*]*\*+)*\//

      CDO            = quote("<!--")
      CDC            = quote("-->")
      INCLUDES       = quote("~=")
      DASHMATCH      = quote("|=")
      PREFIXMATCH    = quote("^=")
      SUFFIXMATCH    = quote("$=")
      SUBSTRINGMATCH = quote("*=")

      HASH = /##{NAME}/

      IMPORT    = quote("@import", Regexp::IGNORECASE)
      PAGE      = quote("@page", Regexp::IGNORECASE)
      MEDIA     = quote("@media", Regexp::IGNORECASE)
      FONT_FACE = quote("@font-face", Regexp::IGNORECASE)
      CHARSET   = quote("@charset", Regexp::IGNORECASE)<commit_msg>[Sass] Fix the string CSS regexps so that they correctly handle escaped quotes.<commit_after>module Sass
  module SCSS
    module RX
      def self.quote(str, flags = 0)
        Regexp.new(Regexp.quote(str), flags)
      end

      H        = /[0-9a-f]/i
      NL       = /\n|\r\n|\r|\f/
      NONASCII = /[\200-\377]/
      UNICODE  = /\\#{H}{1,6}[ \t\r\n\f]?/
      ESCAPE   = /#{UNICODE}|\\[ -~\200-\377]/
      NMSTART  = /[a-z]|#{NONASCII}|#{ESCAPE}/i
      NMCHAR   = /[a-z0-9_-]|#{NONASCII}|#{ESCAPE}/i
      STRING1  = /\"([^\n\r\f\\"]|\\#{NL}|#{ESCAPE})*\"/
      STRING2  = /\'([^\n\r\f\\']|\\#{NL}|#{ESCAPE})*\'/

      IDENT    = /[-_]?#{NMSTART}#{NMCHAR}*/
      NAME     = /#{NMCHAR}+/
      NUM      = /[0-9]+|[0-9]*.[0-9]+/
      STRING   = /#{STRING1}|#{STRING2}/
      URL      = /([!#%$&*-~]|#{NONASCII}|#{ESCAPE})*/
      W        = /[ \t\r\n\f]*/
      RANGE    = /\?{1,6}|#{H}(\?{0,5}|#{H}(\?{0,4}|#{H}(\?{0,3}|#{H}(\?{0,2}|#{H}(\??|#{H})))))/

      ##

      S = /[ \t\r\n\f]+/

      COMMENT = /\/\*[^*]*\*+([^\/][^*]*\*+)*\//

      CDO            = quote("<!--")
      CDC            = quote("-->")
      INCLUDES       = quote("~=")
      DASHMATCH      = quote("|=")
      PREFIXMATCH    = quote("^=")
      SUFFIXMATCH    = quote("$=")
      SUBSTRINGMATCH = quote("*=")

      HASH = /##{NAME}/

      IMPORT    = quote("@import", Regexp::IGNORECASE)
      PAGE      = quote("@page", Regexp::IGNORECASE)
      MEDIA     = quote("@media", Regexp::IGNORECASE)
      FONT_FACE = quote("@font-face", Regexp::IGNORECASE)
      CHARSET   = quote("@charset", Regexp::IGNORECASE)
{'fraction_non_alphanumeric': 0.2968454258675079, 'fraction_numerical': 0.024605678233438486, 'mean_word_length': 1.7815789473684212, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6844622', 'n_tokens_mistral': 1450, 'n_tokens_neox': 1393, 'n_words': 175}