-
Notifications
You must be signed in to change notification settings - Fork 6
/
fixed.html
83 lines (58 loc) · 2.54 KB
/
fixed.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/google/code-prettify/master/src/prettify.css" />
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/google/code-prettify/master/styles/sunburst.css" />
<script type="text/javascript" src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script type="text/javascript" src="lang-rebol.js"></script>
</head>
<body>
<h1>Rebol</h1>
<h2>Highlighting now working in lang-rebol.js (using sunburst CSS)</h2>
<pre class="prettyprint lang-rebol">
Rebol []
; Fixed issues - kept here for regression checking
;
; So below should all work now :)
literal: [the'end]
ok_filename: %file%20with%20space.txt
bad_filename: %"file with space.txt" ; probably best as this anyway
also: %1111.txt ; allows leading numbers
tuples: [333.333.333 444.444.444.444 555.555.555.555.555] ; only defined 3 & 4 tuples at moment
; Decided to make set-word! RE tighter so avoid pollution elsewere
; NB. (though original did seem fine without this check)
bad-setword:[print "must have space before block"]
good-setword: [print "I'm all good"]
; some keyword issues
print
print["must be space after keyword to highlight it"]
print ["this works fine"]
; and will (nearly) always highlight word as keyword (often useful indicator!)
print: func [replace] [print replace] ; this is all fine (by luck!)
print: func [replace x] [print [replace x]] ; this time "replace" is hi-lighted as keyword
foo: does [print]
; NB - Keywords will be highlighted as keyword when preceded by whitespace
; refinements! have issues so not included
ref: [/refinement]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; other edge cases just have to live with (for now)
xxx-replace: xxx-replace - no-xxx-replacethis-xxxreplace-foo ; \b JS issue
; number datatypes funnies
num1: num2 + num2for
; set-word! path!
block/(1 + baz/1): constants/(1 + length? foo)
; type! issues
num!ber: num!ber + 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; not implemented but may do in future
; see undefined types in GCP-datatypes.r
; utf-8 usage
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; tag! - Can't do :(
; * GCP doesn't like html tags unless they're escape
; * ref: http://stackoverflow.com/questions/7787834/using-google-prettify-to-display-html-and-css-code-do-i-have-to-replace-every
; below should highlight correctly! (just a highlighting placeholder!)
print "hello world"
</pre>
</body>
</html>