summaryrefslogtreecommitdiff
path: root/crates/typst-syntax
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-10-19 19:57:47 +0200
committerLaurenz <laurmaedje@gmail.com>2023-10-19 19:57:47 +0200
commit208711203e948501544b82b741c77be3bc46ff97 (patch)
tree5014184423a190677aeff4599fcd8468c37e15e3 /crates/typst-syntax
parent76d4c39ce4730c8d8f00e7e73c020c9309e03756 (diff)
Fix tag list order
Diffstat (limited to 'crates/typst-syntax')
-rw-r--r--crates/typst-syntax/src/highlight.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/crates/typst-syntax/src/highlight.rs b/crates/typst-syntax/src/highlight.rs
index b77af922..cdf6a13d 100644
--- a/crates/typst-syntax/src/highlight.rs
+++ b/crates/typst-syntax/src/highlight.rs
@@ -48,7 +48,9 @@ pub enum Tag {
}
impl Tag {
- /// The list of all tags.
+ /// The list of all tags, in the same order as thy are defined.
+ ///
+ /// Can be used as the counter-part to `tag as usize`.
pub const LIST: &'static [Tag] = &[
Self::Comment,
Self::Punctuation,
@@ -57,13 +59,13 @@ impl Tag {
Self::Emph,
Self::Link,
Self::Raw,
- Self::MathDelimiter,
- Self::MathOperator,
+ Self::Label,
+ Self::Ref,
Self::Heading,
Self::ListMarker,
Self::ListTerm,
- Self::Label,
- Self::Ref,
+ Self::MathDelimiter,
+ Self::MathOperator,
Self::Keyword,
Self::Operator,
Self::Number,