Skip to content

Commit

Permalink
feat: support includes
Browse files Browse the repository at this point in the history
This is the very start of the preprocessor work. Currently only includes work and at a
very basic level.
  • Loading branch information
nlopes committed Oct 19, 2024
1 parent 9cce9f3 commit b1e7581
Show file tree
Hide file tree
Showing 30 changed files with 867 additions and 142 deletions.
95 changes: 81 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acdc-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pest_derive = "2.7"
serde = { version = "1", features = ["derive"] }
tracing.workspace = true
thiserror.workspace = true
url = "2.5.2"

[dev-dependencies]
pretty_assertions.workspace = true
Expand Down
6 changes: 4 additions & 2 deletions acdc-parser/fixtures/samples/README.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Samples

This folder contains some sample `.adoc` files found online.
This folder contains some sample `AsciiDoc`s found online.

If found in repositories, I'm leaving here their respective LICENSE and original source
location as of the time I copied them.

* link:./mdbasics.adoc[mdbasics.adoc] (https://github.com/asciidoctor/asciidoctor/blob/c519d346d9b5c714b9df25e934757dad840fd997/benchmark/sample-data/mdbasics.adoc[Original], https://github.com/asciidoctor/asciidoctor/blob/c519d346d9b5c714b9df25e934757dad840fd997/LICENSE[License] MIT)
* link:./mdbasics/mdbasics.adoc[mdbasics.adoc] (https://github.com/asciidoctor/asciidoctor/blob/c519d346d9b5c714b9df25e934757dad840fd997/benchmark/sample-data/mdbasics.adoc[Original], https://github.com/asciidoctor/asciidoctor/blob/c519d346d9b5c714b9df25e934757dad840fd997/LICENSE[License] MIT)
* link:./book-starter[book-starter] (https://github.com/lirantal/asciidoc-book-starter/tree/main[repo], no license specified)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
= The Beginning

My name is {author}.
Some text

[.text-center]
_The future is here, but some people are still using legacy databases._

Do you think that `fastify.ready()` is a good function call or should
we be calling `fastify.listen()` instead?

Docker allows to package the full stack in a container:

* OS
** Windows
** Ubuntu
* JVM
* App server
* Application with its configuration
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
= The Rocket

****
[discrete]
== Chapter Summary
To float in Space what you really need is a rocket.
A rocket is a device that can take you from the ground to space.
[discrete]
== Sections
1. Rockets
2. Spaceships
3. Space
****

More text comes here...

[source,javascript,linenums,highlight=2;12-13]
:snippetFilename: ./index.js
.{snippetFilename}
----
// Require the framework and instantiate it
const fastify = require('fastify')({ logger: true })

fastify.get('/', async (request, reply) => { // <.>
return { hello: 'world' }
})

const start = async () => {
try {
await fastify.listen({ port: 3000 }) // <.>
} catch (err) {
fastify.log.error(err)
process.exit(1)
}
}
start()
----

== Which section is this...

Here are the other built-in admonition types:

====
*General section*
This is something you should definitely consider doing every time
that you write a paragraph. The reason is that it makes it easier
to read and understand.
====

NOTE: Some additional info...

.My header for the tip
[TIP]
====
*WARNING*
This is something you should definitely consider doing every time
that you write a paragraph. The reason is that it makes it easier
to read and understand.
====

IMPORTANT: Don't forget...

[WARNING]
====
icon:warning[] *WARNING*
This warning admonition type is styled in a way that uses 0 font size
so that it is not visible in the PDF output.
====

CAUTION: Ensure that...

Now print a block quote:

[quote, Ben Parker, Spiderman Movie]
____
With great power comes great responsibility.
____

The text after a prose block quote
Loading

0 comments on commit b1e7581

Please sign in to comment.