<commit_before>%YAML 1.2
---
name: MultiMarkdown
scope: text.html.markdown.multimarkdown

file_extensions:
  - mmd

first_line_match: (?i:^format:\s*complete\s*$)

variables:
  header: ([A-Za-z0-9][\w -]*)(:)

contexts:
  main:
    - match: ^(?={{header}})
      push: multimarkdown-header
    - match: ^
      set: multimarkdown-content

  multimarkdown-header:
    - match: ^$
      pop: true
    - match: ^(?:{{header}}\s*)?
      captures:
        1: keyword.other.multimarkdown
        2: punctuation.separator.key-value.multimarkdown
      push: multimarkdown-header-value

  multimarkdown-header-value:
    - meta_scope: meta.header.multimarkdown
    - meta_content_scope: string.unquoted.multimarkdown
    - match: \n
      pop: true

  multimarkdown-content:
    - meta_scope: meta.content.multimarkdown
    - include: scope:text.html.markdown
<commit_msg>Syntax: Remove file extension from MultiMarkdown<commit_after>%YAML 1.2
---
name: MultiMarkdown
scope: text.html.markdown.multimarkdown

first_line_match: (?i:^format:\s*complete\s*$)

variables:
  header: ([A-Za-z0-9][\w -]*)(:)

contexts:
  main:
    - match: ^(?={{header}})
      push: multimarkdown-header
    - match: ^
      set: multimarkdown-content

  multimarkdown-header:
    - match: ^$
      pop: true
    - match: ^(?:{{header}}\s*)?
      captures:
        1: keyword.other.multimarkdown
        2: punctuation.separator.key-value.multimarkdown
      push: multimarkdown-header-value

  multimarkdown-header-value:
    - meta_scope: meta.header.multimarkdown
    - meta_content_scope: string.unquoted.multimarkdown
    - match: \n
      pop: true

  multimarkdown-content:
    - meta_scope: meta.content.multimarkdown
    - include: scope:text.html.markdown

{'fraction_non_alphanumeric': 0.14088556641748132, 'fraction_numerical': 0.006900517538815411, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4807905', 'n_tokens_mistral': 642, 'n_tokens_neox': 615, 'n_words': 101}