Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[specification] PDF update #43

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion specification/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ OPTIONS := --trace \
REQUIRES := --require=asciidoctor-bibtex \
--require=asciidoctor-diagram \
--require=asciidoctor-mathematical
REQUIRES := --require=asciidoctor-bibtex \
--require=asciidoctor-diagram \
--require=asciidoctor-mathematical \
--require=./preprocessor.rb

.PHONY: all build clean build-container build-no-container

all: build

build:
build:
@echo "Checking if Docker is available..."
@if command -v docker >/dev/null 2>&1 ; then \
echo "Docker is available, building inside Docker container..."; \
Expand Down
20 changes: 20 additions & 0 deletions specification/preprocessor.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
require 'asciidoctor'
require 'asciidoctor/extensions'

require 'asciidoctor/extensions'

Asciidoctor::Extensions.register do
preprocessor do
process do |document, reader|
new_lines = []
reader.readlines.each do |line|
if line.strip == "[source,mermaid]"
new_lines << "[mermaid]"
else
new_lines << line
end
end
Asciidoctor::Reader.new(new_lines)
end
end
end
Binary file modified specification/riscv-cove-io.pdf
Binary file not shown.
Loading