mirror of
https://github.com/typst/typst
synced 2025-05-22 04:55:29 +08:00
Add Tag::LIST
constant
This commit is contained in:
parent
0710d1c118
commit
63b5ced5db
@ -48,6 +48,31 @@ pub enum Tag {
|
||||
}
|
||||
|
||||
impl Tag {
|
||||
/// The list of all tags.
|
||||
pub const LIST: &'static [Tag] = &[
|
||||
Self::Comment,
|
||||
Self::Punctuation,
|
||||
Self::Escape,
|
||||
Self::Strong,
|
||||
Self::Emph,
|
||||
Self::Link,
|
||||
Self::Raw,
|
||||
Self::MathDelimiter,
|
||||
Self::MathOperator,
|
||||
Self::Heading,
|
||||
Self::ListMarker,
|
||||
Self::ListTerm,
|
||||
Self::Label,
|
||||
Self::Ref,
|
||||
Self::Keyword,
|
||||
Self::Operator,
|
||||
Self::Number,
|
||||
Self::String,
|
||||
Self::Function,
|
||||
Self::Interpolated,
|
||||
Self::Error,
|
||||
];
|
||||
|
||||
/// Return the recommended TextMate grammar scope for the given highlighting
|
||||
/// tag.
|
||||
pub fn tm_scope(&self) -> &'static str {
|
||||
|
Loading…
x
Reference in New Issue
Block a user