File: fedi-basic.lang

package info (click to toggle)
tuba 0.10.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,976 kB
  • sloc: xml: 248; makefile: 94; python: 14
file content (31 lines) | stat: -rw-r--r-- 951 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="UTF-8"?>
<language id="fedi-basic" _name="Fedi Basic Highlighting" version="2.0" _section="Markup">
	<styles>
		<style id="hashtag" name="Hashtag" map-to="rust:attribute" />
		<style id="mention" name="Mention" map-to="rust:lifetime" />
		<style id="emoji" name="Emoji" map-to="rust:macro" />
	</styles>
	<definitions>
		<context id="hashtag" style-ref="hashtag">
			<match>(?:\W|^)#([\p{L}_0-9]+)</match>
		</context>
		<context id="mention" style-ref="mention">
			<match>(?:\W|^)@[a-zA-Z0-9_]+(@[a-zA-Z0-9_\.\-]+)?</match>
		</context>
		<context id="emoji" style-ref="emoji">
			<match>(?:\W|^):[a-zA-Z0-9_]{2,}:</match>
		</context>
		<context id="fedi-syntax">
			<include>
				<context ref="hashtag"/>
				<context ref="mention"/>
				<context ref="emoji"/>
			</include>
		</context>
		<context id="fedi-basic">
			<include>
				<context ref="fedi-syntax"/>
			</include>
		</context>
	</definitions>
</language>