Skip to content

Commit

Permalink
added alignment elements and attributes: malignmark and maligngroup
Browse files Browse the repository at this point in the history
  • Loading branch information
ocket8888 committed Oct 11, 2017
1 parent 595c245 commit d3f0a2b
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions MathML.sublime-syntax
Expand Up @@ -439,6 +439,34 @@ contexts:
- include: tabular-alignment-tags
- include: tag-stuff

#alignment mark
- match: (</?)((?i:malignmark)\b)
captures:
1: punctuation.definition.tag.begin.mathml
2: entity.name.tag.block.malignmark.mathml
push:
- meta_scope: meta.tag.block.malignmark.mathml
- match: '>'
scope: punctuation.definition.tag.end.mathml
pop: true
- include: presentation-style-tags
- include: malignmark-tags
- include: tag-stuff

#alignment group
- match: (</?)((?i:maligngroup)\b)
captures:
1: punctuation.definition.tag.begin.mathml
2: entity.name.tag.block.maligngroup.mathml
push:
- meta_scope: meta.tag.block.maligngroup.mathml
- match: '>'
scope: punctuation.definition.tag.end.mathml
pop: true
- include: presentation-style-tags
- include: maligngroup-tags
- include: tag-stuff

- include: entities
- match: <.*>
scope: invalid.illegal.incomplete.mathml
Expand Down Expand Up @@ -1538,6 +1566,68 @@ contexts:
- match: ''
pop: true

#alignment mark attributes
malignmark-tags:

#specifies how many columns this data spans
- match: '(?:^|\s+)\b((edge)\b\s*(=)\s*)'
captures:
1: meta.attribute-with-value.edge.mathml
2: entity.other.attribute-name.edge.mathml
3: punctuation.separator.key-value.mathml
push:
- match: '"'
scope: punctuation.definition.string.begin.mathml
set:
- meta_scope: meta.attribute-with-value.edge.mathml string.quoted.double.mathml
- match: '"'
scope: punctuation.definition.string.end.mathml
pop: true
- include: attribute-entities
- match: "'"
scope: punctuation.definition.string.begin.mathml
set:
- meta_scope: meta.attribute-with-value.edge.mathml string.quoted.single.mathml
- match: "'"
scope: punctuation.definition.string.end.mathml
pop: true
- include: attribute-entities
- match: '(?:[^\s<>/''"]|/(?!>))+'
scope: meta.attribute-with-value.edge.mathml string.unquoted.mathml
- match: ''
pop: true

#alignment group attributes
maligngroup-tags:

#group alignment
- match: '(?:^|\s+)\b((groupalign)\b\s*(=)\s*)'
captures:
1: meta.attribute-with-value.groupalign.mathml
2: entity.other.attribute-name.groupalign.mathml
3: punctuation.separator.key-value.mathml
push:
- match: '"'
scope: punctuation.definition.string.begin.mathml
set:
- meta_scope: meta.attribute-with-value.groupalign.mathml string.quoted.double.mathml
- match: '"'
scope: punctuation.definition.string.end.mathml
pop: true
- include: attribute-entities
- match: "'"
scope: punctuation.definition.string.begin.mathml
set:
- meta_scope: meta.attribute-with-value.groupalign.mathml string.quoted.single.mathml
- match: "'"
scope: punctuation.definition.string.end.mathml
pop: true
- include: attribute-entities
- match: '(?:[^\s<>/''"]|/(?!>))+'
scope: meta.attribute-with-value.groupalign.mathml string.unquoted.mathml
- match: ''
pop: true

#A collection of basically every attribute, since mstyle can have it all
#( a living list to be updated as I progress)
mstyle-tags:
Expand Down

0 comments on commit d3f0a2b

Please sign in to comment.