aboutsummaryrefslogtreecommitdiff
path: root/em
blob: f2118a34e2bbbcb57db1d3ba0ee6a7a3e175ecbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/rc

# em -- limited hypertext markup language

if(~ $#* 0){
	ramfs -p
	file=/tmp/file
	cat > $file
}
if not
	file=$1

if(~ $#linktext 0) linktext=link
hrefs=`'
'{aux/emcollect $file}
for(href in $hrefs){
	parts=`'=
'{echo $href}
	ref$parts(1)=$parts(2)
}

aux/emparse $file