File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 57281f52e509fc13c2c978a43b18ee70a910f4e7
2
+ refs/heads/master: 0a347e760f4757fc75e63f005857c63894fc9e1e
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
Original file line number Diff line number Diff line change @@ -40,7 +40,16 @@ var out = outfile ? fs.createWriteStream(outfile) : process.stdout;
40
40
while ( ( line = lines [ cur ++ ] ) != null ) {
41
41
if ( / ^ ~ ~ ~ / . test ( line ) ) {
42
42
var block = "" , bline ;
43
- var isRust = ! / n o t r u s t / . test ( line ) ;
43
+ var notRust =
44
+ / n o t r u s t / . test ( line )
45
+ // These are all used by the language ref to indicate things
46
+ // that are not Rust source code
47
+ || / e b n f / . test ( line )
48
+ || / a b n f / . test ( line )
49
+ || / k e y w o r d / . test ( line )
50
+ || / f i e l d / . test ( line )
51
+ || / p r e c e d e n c e / . test ( line ) ;
52
+ var isRust = ! notRust ;
44
53
while ( ( bline = lines [ cur ++ ] ) != null ) {
45
54
if ( / ^ ~ ~ ~ / . test ( bline ) ) break ;
46
55
if ( ! / ^ \s * # # ? / . test ( bline ) ) block += bline + "\n" ;
Original file line number Diff line number Diff line change @@ -12,20 +12,25 @@ ifeq ($(CFG_PANDOC),)
12
12
$(info cfg : no pandoc found, omitting doc/rust.pdf)
13
13
else
14
14
15
+ ifeq ($(CFG_NODE),)
16
+ $(info cfg : no node found, omitting doc/tutorial.html)
17
+ else
18
+
15
19
DOCS += doc/rust.html
16
20
doc/rust.html : rust.md doc/version.md doc/keywords.md $(S ) doc/rust.css
17
21
@$(call E, pandoc: $@ )
18
- $(Q ) " $( CFG_PANDOC) " \
22
+ $(Q )$(CFG_NODE ) $(S ) doc/prep.js --highlight $< | \
23
+ " $( CFG_PANDOC) " \
19
24
--standalone --toc \
20
25
--section-divs \
21
26
--number-sections \
22
27
--from =markdown --to=html \
23
28
--css=rust.css \
24
- --output=$@ \
25
- $<
29
+ --output=$@
26
30
@$(call E, cp: $(S)doc/rust.css)
27
31
-$(Q)cp -a $(S)doc/rust.css doc/rust.css 2> /dev/null
28
32
33
+ endif
29
34
30
35
ifeq ($(CFG_PDFLATEX),)
31
36
$(info cfg : no pdflatex found, omitting doc/rust.pdf)
You can’t perform that action at this time.
0 commit comments