Skip to content

Commit 862aced

Browse files
committed
doc: remove node.js dependency
`prep.js` outputs its own HTML directives, which `pandoc` cannot recognize when converting the document into LaTeX (this is why the PDF docs have never been highlighted as of now). Note that if we were to add the `.rust` class to snippets, we could probably use pandoc's native highlighting capatibilities i.e. Kate.
1 parent 62f1d68 commit 862aced

File tree

7 files changed

+5
-705
lines changed

7 files changed

+5
-705
lines changed

configure

-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ probe CFG_PANDOC pandoc
457457
probe CFG_PDFLATEX pdflatex
458458
probe CFG_XETEX xetex
459459
probe CFG_LUATEX luatex
460-
probe CFG_NODE nodejs node
461460
probe CFG_GDB gdb
462461
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
463462
then

mk/docs.mk

+3-10
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ $(info cfg: no pandoc found, omitting PDF and EPUB docs)
9393
ONLY_HTML_DOCS = 1
9494
endif
9595

96-
ifeq ($(CFG_NODE),)
97-
$(info cfg: no node found, omitting PDF and EPUB docs)
98-
ONLY_HTML_DOCS = 1
99-
endif
100-
10196

10297
######################################################################
10398
# Rust version
@@ -118,7 +113,7 @@ doc/version_info.html: $(D)/version_info.html.template $(MKFILE_DEPS) \
118113
GENERATED += doc/version.md doc/version_info.html
119114

120115
######################################################################
121-
# Docs, from rustdoc and sometimes pandoc & node
116+
# Docs, from rustdoc and sometimes pandoc
122117
######################################################################
123118

124119
doc/:
@@ -168,15 +163,13 @@ ifneq ($(ONLY_HTML_DOCS),1)
168163
DOC_TARGETS += doc/$(1).epub
169164
doc/$(1).epub: $$(D)/$(1).md | doc/
170165
@$$(call E, pandoc: $$@)
171-
$$(Q)$$(CFG_NODE) $$(D)/prep.js --highlight $$< | \
172-
$$(CFG_PANDOC) $$(PANDOC_EPUB_OPTS) --output=$$@
166+
$$(CFG_PANDOC) $$(PANDOC_EPUB_OPTS) $$< --output=$$@
173167

174168
# PDF (md =(pandoc)=> tex =(pdflatex)=> pdf)
175169
DOC_TARGETS += doc/$(1).tex
176170
doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.md | doc/
177171
@$$(call E, pandoc: $$@)
178-
$$(Q)$$(CFG_NODE) $$(D)/prep.js $$< | \
179-
$$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) --output=$$@
172+
$$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) $$< --output=$$@
180173

181174
ifneq ($(NO_PDF_DOCS),1)
182175
ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1)

src/doc/README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
document converter, is required to generate docs as HTML from Rust's
55
source code.
66

7-
[Node.js](http://nodejs.org/) is also required for generating HTML from
8-
the Markdown docs (reference manual, tutorials, etc.) distributed with
9-
this git repository.
10-
117
[po4a](http://po4a.alioth.debian.org/) is required for generating translated
128
docs from the master (English) docs.
139

@@ -30,8 +26,8 @@ rustdoc --output-dir html-doc/ --output-format html ../src/libstd/path.rs
3026

3127
# Additional notes
3228

33-
To generate an HTML version of a doc from Markdown without having Node.js
34-
installed, you can do something like:
29+
To generate an HTML version of a doc from Markdown manually, you can do
30+
something like:
3531

3632
~~~~
3733
pandoc --from=markdown --to=html5 --number-sections -o rust.html rust.md

src/doc/lib/codemirror-node.js

-146
This file was deleted.

0 commit comments

Comments
 (0)