quillmark 0.4.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {quillmark-0.4.0 → quillmark-0.4.1}/Cargo.lock +10 -10
- {quillmark-0.4.0 → quillmark-0.4.1}/Cargo.toml +7 -6
- {quillmark-0.4.0 → quillmark-0.4.1}/PKG-INFO +1 -1
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark/Cargo.toml +1 -1
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-acroform/Cargo.toml +1 -1
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-core/Cargo.toml +1 -1
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-core/src/parse.rs +156 -15
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/Cargo.toml +1 -1
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/extended_metadata_demo.md +2 -2
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_form_8/usaf_form_8.md +6 -1
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/Cargo.toml +1 -1
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-typst/Cargo.toml +1 -1
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-typst/src/filters.rs +0 -2
- {quillmark-0.4.0 → quillmark-0.4.1}/README.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/pyproject.toml +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/python/quillmark/__init__.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/python/quillmark/__init__.pyi +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/python/quillmark/py.typed +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark/README.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark/src/lib.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark/src/orchestration.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-acroform/README.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-acroform/src/lib.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-core/README.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-core/src/backend.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-core/src/error.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-core/src/lib.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-core/src/quill.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-core/src/templating.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-core/src/types.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-core/src/value.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/.npmignore +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/README.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/appreciated_letter/Quill.toml +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/appreciated_letter/appreciated_letter.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/appreciated_letter/glue.typ +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/frontmatter_demo.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/sample.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/taro/Quill.toml +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/taro/glue.typ +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/taro/taro.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/taro.png +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_form_8/Quill.toml +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_form_8/form.pdf +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/.quillignore +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/Quill.toml +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/assets/dow_seal.png +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/glue.typ +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/.gitignore +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/LICENSE +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/fonts/Cinzel/Cinzel-Regular.ttf +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/fonts/Cinzel/LICENSE +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/fonts/CopperplateCC/CopperplateCC-Heavy.otf +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/fonts/CopperplateCC/LICENSE.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/fonts/NimbusRomanNo9L/GNU General Public License.txt +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/fonts/NimbusRomanNo9L/NimbusRomNo9L-Med.otf +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/fonts/NimbusRomanNo9L/NimbusRomNo9L-MedIta.otf +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/fonts/NimbusRomanNo9L/NimbusRomNo9L-Reg.otf +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/fonts/NimbusRomanNo9L/NimbusRomNo9L-RegIta.otf +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/src/lib.typ +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/src/utils.typ +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/packages/tonguetoquill-usaf-memo/typst.toml +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/usaf_memo.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/src/lib.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/.gitignore +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/IMPLEMENTATION_SUMMARY.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/README.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/examples/basic.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/examples/batch.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/examples/workflow_demo.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/python/quillmark/__init__.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/python/quillmark/__init__.pyi +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/python/quillmark/py.typed +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/src/enums.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/src/errors.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/src/lib.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/src/types.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/tests/conftest.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/tests/test_api_requirements.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/tests/test_engine.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/tests/test_parse.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/tests/test_quill.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/tests/test_render.py +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-python/uv.lock +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-typst/README.md +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-typst/src/compile.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-typst/src/convert.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-typst/src/error_mapping.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-typst/src/lib.rs +0 -0
- {quillmark-0.4.0 → quillmark-0.4.1}/quillmark-typst/src/world.rs +0 -0
@@ -4,9 +4,9 @@ version = 4
|
|
4
4
|
|
5
5
|
[[package]]
|
6
6
|
name = "acroform"
|
7
|
-
version = "0.1.
|
7
|
+
version = "0.1.3"
|
8
8
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
9
|
-
checksum = "
|
9
|
+
checksum = "de7f2f94dd867d55d799a2bae63e4bdce7ea6e1d40ea9e7ba1c07d977942b44d"
|
10
10
|
dependencies = [
|
11
11
|
"lopdf",
|
12
12
|
]
|
@@ -2043,7 +2043,7 @@ dependencies = [
|
|
2043
2043
|
|
2044
2044
|
[[package]]
|
2045
2045
|
name = "quillmark"
|
2046
|
-
version = "0.4.
|
2046
|
+
version = "0.4.1"
|
2047
2047
|
dependencies = [
|
2048
2048
|
"acroform",
|
2049
2049
|
"anyhow",
|
@@ -2060,7 +2060,7 @@ dependencies = [
|
|
2060
2060
|
|
2061
2061
|
[[package]]
|
2062
2062
|
name = "quillmark-acroform"
|
2063
|
-
version = "0.4.
|
2063
|
+
version = "0.4.1"
|
2064
2064
|
dependencies = [
|
2065
2065
|
"acroform",
|
2066
2066
|
"minijinja",
|
@@ -2073,7 +2073,7 @@ dependencies = [
|
|
2073
2073
|
|
2074
2074
|
[[package]]
|
2075
2075
|
name = "quillmark-core"
|
2076
|
-
version = "0.4.
|
2076
|
+
version = "0.4.1"
|
2077
2077
|
dependencies = [
|
2078
2078
|
"anyhow",
|
2079
2079
|
"glob",
|
@@ -2088,7 +2088,7 @@ dependencies = [
|
|
2088
2088
|
|
2089
2089
|
[[package]]
|
2090
2090
|
name = "quillmark-fixtures"
|
2091
|
-
version = "0.4.
|
2091
|
+
version = "0.4.1"
|
2092
2092
|
dependencies = [
|
2093
2093
|
"quillmark",
|
2094
2094
|
"quillmark-typst",
|
@@ -2096,7 +2096,7 @@ dependencies = [
|
|
2096
2096
|
|
2097
2097
|
[[package]]
|
2098
2098
|
name = "quillmark-fuzz"
|
2099
|
-
version = "0.4.
|
2099
|
+
version = "0.4.1"
|
2100
2100
|
dependencies = [
|
2101
2101
|
"proptest",
|
2102
2102
|
"quillmark-core",
|
@@ -2105,7 +2105,7 @@ dependencies = [
|
|
2105
2105
|
|
2106
2106
|
[[package]]
|
2107
2107
|
name = "quillmark-python"
|
2108
|
-
version = "0.4.
|
2108
|
+
version = "0.4.1"
|
2109
2109
|
dependencies = [
|
2110
2110
|
"anyhow",
|
2111
2111
|
"pyo3",
|
@@ -2116,7 +2116,7 @@ dependencies = [
|
|
2116
2116
|
|
2117
2117
|
[[package]]
|
2118
2118
|
name = "quillmark-typst"
|
2119
|
-
version = "0.4.
|
2119
|
+
version = "0.4.1"
|
2120
2120
|
dependencies = [
|
2121
2121
|
"anyhow",
|
2122
2122
|
"dirs",
|
@@ -2138,7 +2138,7 @@ dependencies = [
|
|
2138
2138
|
|
2139
2139
|
[[package]]
|
2140
2140
|
name = "quillmark-wasm"
|
2141
|
-
version = "0.4.
|
2141
|
+
version = "0.4.1"
|
2142
2142
|
dependencies = [
|
2143
2143
|
"console_error_panic_hook",
|
2144
2144
|
"getrandom 0.3.4",
|
@@ -11,10 +11,11 @@ default-members = [
|
|
11
11
|
resolver = "2"
|
12
12
|
|
13
13
|
[workspace.package]
|
14
|
-
version = "0.4.
|
14
|
+
version = "0.4.1"
|
15
15
|
edition = "2021"
|
16
16
|
include = ["src/**", "Cargo.toml", "README*", "LICENSE*"]
|
17
17
|
readme = "README.md"
|
18
|
+
license = "Apache-2.0"
|
18
19
|
|
19
20
|
[workspace.dependencies]
|
20
21
|
# Core dependencies
|
@@ -43,13 +44,13 @@ typst-svg = "0.13.1"
|
|
43
44
|
dirs = "6.0"
|
44
45
|
|
45
46
|
# AcroForm backend dependencies
|
46
|
-
acroform = "0.1.
|
47
|
+
acroform = "0.1.3"
|
47
48
|
|
48
49
|
# Intra-project dependencies
|
49
|
-
quillmark-core = { version = "0.4.
|
50
|
-
quillmark-typst = { version = "0.4.
|
51
|
-
quillmark-acroform = { version = "0.4.
|
52
|
-
quillmark = { version = "0.4.
|
50
|
+
quillmark-core = { version = "0.4.1", path = "quillmark-core" }
|
51
|
+
quillmark-typst = { version = "0.4.1", path = "quillmark-typst", default-features = false }
|
52
|
+
quillmark-acroform = { version = "0.4.1", path = "quillmark-acroform" }
|
53
|
+
quillmark = { version = "0.4.1", path = "quillmark", default-features = false }
|
53
54
|
|
54
55
|
# Test and dev dependencies
|
55
56
|
tempfile = "~3.23"
|
@@ -5,7 +5,7 @@ edition.workspace = true
|
|
5
5
|
include.workspace = true
|
6
6
|
readme = "README.md"
|
7
7
|
description = "Quillmark engine API"
|
8
|
-
license =
|
8
|
+
license.workspace = true
|
9
9
|
documentation = "https://docs.rs/quillmark"
|
10
10
|
homepage = "https://github.com/nibsbin/quillmark"
|
11
11
|
repository = "https://github.com/nibsbin/quillmark"
|
@@ -5,7 +5,7 @@ edition.workspace = true
|
|
5
5
|
include.workspace = true
|
6
6
|
readme = "README.md"
|
7
7
|
description = "AcroForm backend for Quillmark"
|
8
|
-
license =
|
8
|
+
license.workspace = true
|
9
9
|
documentation = "https://docs.rs/quillmark-acroform"
|
10
10
|
homepage = "https://github.com/nibsbin/quillmark"
|
11
11
|
repository = "https://github.com/nibsbin/quillmark"
|
@@ -5,7 +5,7 @@ edition.workspace = true
|
|
5
5
|
include.workspace = true
|
6
6
|
readme = "README.md"
|
7
7
|
description = "Core types and functionality for Quillmark"
|
8
|
-
license =
|
8
|
+
license.workspace = true
|
9
9
|
documentation = "https://docs.rs/quillmark-core"
|
10
10
|
homepage = "https://github.com/nibsbin/quillmark"
|
11
11
|
repository = "https://github.com/nibsbin/quillmark"
|
@@ -191,7 +191,15 @@ fn find_metadata_blocks(
|
|
191
191
|
let abs_pos = pos + delimiter_pos;
|
192
192
|
let content_start = abs_pos + delimiter_len; // After "---\n" or "---\r\n"
|
193
193
|
|
194
|
-
// Check if
|
194
|
+
// Check if this --- is a horizontal rule (blank lines above AND below)
|
195
|
+
let preceded_by_blank = if abs_pos > 0 {
|
196
|
+
// Check if there's a blank line before the ---
|
197
|
+
let before = &markdown[..abs_pos];
|
198
|
+
before.ends_with("\n\n") || before.ends_with("\r\n\r\n")
|
199
|
+
} else {
|
200
|
+
false
|
201
|
+
};
|
202
|
+
|
195
203
|
let followed_by_blank = if content_start < markdown.len() {
|
196
204
|
markdown[content_start..].starts_with('\n')
|
197
205
|
|| markdown[content_start..].starts_with("\r\n")
|
@@ -199,13 +207,23 @@ fn find_metadata_blocks(
|
|
199
207
|
false
|
200
208
|
};
|
201
209
|
|
202
|
-
|
210
|
+
// Horizontal rule: blank lines both above and below
|
211
|
+
if preceded_by_blank && followed_by_blank {
|
203
212
|
// This is a horizontal rule in the body, skip it
|
204
213
|
pos = abs_pos + 3; // Skip past "---"
|
205
214
|
continue;
|
206
215
|
}
|
207
216
|
|
208
|
-
//
|
217
|
+
// Check if followed by non-blank line (or if we're at document start)
|
218
|
+
// This starts a metadata block
|
219
|
+
if followed_by_blank {
|
220
|
+
// --- followed by blank line but NOT preceded by blank line
|
221
|
+
// This is NOT a metadata block opening, skip it
|
222
|
+
pos = abs_pos + 3;
|
223
|
+
continue;
|
224
|
+
}
|
225
|
+
|
226
|
+
// Found potential metadata block opening (followed by non-blank line)
|
209
227
|
// Look for closing "\n---\n" or "\r\n---\r\n" etc., OR "\n---" / "\r\n---" at end of document
|
210
228
|
let rest = &markdown[content_start..];
|
211
229
|
|
@@ -252,18 +270,6 @@ fn find_metadata_blocks(
|
|
252
270
|
.into());
|
253
271
|
}
|
254
272
|
|
255
|
-
// Check if the block is contiguous (no blank lines in the YAML content)
|
256
|
-
if content.contains("\n\n") || content.contains("\r\n\r\n") {
|
257
|
-
// Not a contiguous block
|
258
|
-
if abs_pos == 0 {
|
259
|
-
// Started at beginning but has blank lines - this is an error
|
260
|
-
return Err("Frontmatter started but not closed with ---".into());
|
261
|
-
}
|
262
|
-
// Otherwise treat as horizontal rule in body
|
263
|
-
pos = abs_pos + 3;
|
264
|
-
continue;
|
265
|
-
}
|
266
|
-
|
267
273
|
// Parse YAML content to check for reserved keys (QUILL, SCOPE)
|
268
274
|
// First, try to parse as YAML
|
269
275
|
let (tag, quill_name, yaml_content) = if !content.is_empty() {
|
@@ -1314,6 +1320,141 @@ SCOPE: items
|
|
1314
1320
|
.to_string()
|
1315
1321
|
.contains("Cannot specify both QUILL and SCOPE"));
|
1316
1322
|
}
|
1323
|
+
|
1324
|
+
#[test]
|
1325
|
+
fn test_blank_lines_in_frontmatter() {
|
1326
|
+
// New parsing standard: blank lines are allowed within YAML blocks
|
1327
|
+
let markdown = r#"---
|
1328
|
+
title: Test Document
|
1329
|
+
author: Test Author
|
1330
|
+
|
1331
|
+
description: This has a blank line above it
|
1332
|
+
tags:
|
1333
|
+
- one
|
1334
|
+
- two
|
1335
|
+
---
|
1336
|
+
|
1337
|
+
# Hello World
|
1338
|
+
|
1339
|
+
This is the body."#;
|
1340
|
+
|
1341
|
+
let doc = decompose(markdown).unwrap();
|
1342
|
+
|
1343
|
+
assert_eq!(doc.body(), Some("\n# Hello World\n\nThis is the body."));
|
1344
|
+
assert_eq!(
|
1345
|
+
doc.get_field("title").unwrap().as_str().unwrap(),
|
1346
|
+
"Test Document"
|
1347
|
+
);
|
1348
|
+
assert_eq!(
|
1349
|
+
doc.get_field("author").unwrap().as_str().unwrap(),
|
1350
|
+
"Test Author"
|
1351
|
+
);
|
1352
|
+
assert_eq!(
|
1353
|
+
doc.get_field("description").unwrap().as_str().unwrap(),
|
1354
|
+
"This has a blank line above it"
|
1355
|
+
);
|
1356
|
+
|
1357
|
+
let tags = doc.get_field("tags").unwrap().as_sequence().unwrap();
|
1358
|
+
assert_eq!(tags.len(), 2);
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
#[test]
|
1362
|
+
fn test_blank_lines_in_scope_blocks() {
|
1363
|
+
// Blank lines should be allowed in SCOPE blocks too
|
1364
|
+
let markdown = r#"---
|
1365
|
+
SCOPE: items
|
1366
|
+
name: Item 1
|
1367
|
+
|
1368
|
+
price: 19.99
|
1369
|
+
|
1370
|
+
tags:
|
1371
|
+
- electronics
|
1372
|
+
- gadgets
|
1373
|
+
---
|
1374
|
+
|
1375
|
+
Body of item 1."#;
|
1376
|
+
|
1377
|
+
let doc = decompose(markdown).unwrap();
|
1378
|
+
|
1379
|
+
let items = doc.get_field("items").unwrap().as_sequence().unwrap();
|
1380
|
+
assert_eq!(items.len(), 1);
|
1381
|
+
|
1382
|
+
let item = items[0].as_object().unwrap();
|
1383
|
+
assert_eq!(item.get("name").unwrap().as_str().unwrap(), "Item 1");
|
1384
|
+
assert_eq!(item.get("price").unwrap().as_f64().unwrap(), 19.99);
|
1385
|
+
|
1386
|
+
let tags = item.get("tags").unwrap().as_array().unwrap();
|
1387
|
+
assert_eq!(tags.len(), 2);
|
1388
|
+
}
|
1389
|
+
|
1390
|
+
#[test]
|
1391
|
+
fn test_horizontal_rule_with_blank_lines_above_and_below() {
|
1392
|
+
// Horizontal rule: blank lines both above AND below the ---
|
1393
|
+
let markdown = r#"---
|
1394
|
+
title: Test
|
1395
|
+
---
|
1396
|
+
|
1397
|
+
First paragraph.
|
1398
|
+
|
1399
|
+
---
|
1400
|
+
|
1401
|
+
Second paragraph."#;
|
1402
|
+
|
1403
|
+
let doc = decompose(markdown).unwrap();
|
1404
|
+
|
1405
|
+
assert_eq!(doc.get_field("title").unwrap().as_str().unwrap(), "Test");
|
1406
|
+
|
1407
|
+
// The body should contain the horizontal rule (---) as part of the content
|
1408
|
+
let body = doc.body().unwrap();
|
1409
|
+
assert!(body.contains("First paragraph."));
|
1410
|
+
assert!(body.contains("---"));
|
1411
|
+
assert!(body.contains("Second paragraph."));
|
1412
|
+
}
|
1413
|
+
|
1414
|
+
#[test]
|
1415
|
+
fn test_horizontal_rule_not_preceded_by_blank() {
|
1416
|
+
// --- not preceded by blank line but followed by blank line is NOT a horizontal rule
|
1417
|
+
// It's also NOT a valid metadata block opening (since it's followed by blank)
|
1418
|
+
let markdown = r#"---
|
1419
|
+
title: Test
|
1420
|
+
---
|
1421
|
+
|
1422
|
+
First paragraph.
|
1423
|
+
---
|
1424
|
+
|
1425
|
+
Second paragraph."#;
|
1426
|
+
|
1427
|
+
let doc = decompose(markdown).unwrap();
|
1428
|
+
|
1429
|
+
let body = doc.body().unwrap();
|
1430
|
+
// The second --- should be in the body as text (not a horizontal rule since no blank above)
|
1431
|
+
assert!(body.contains("---"));
|
1432
|
+
}
|
1433
|
+
|
1434
|
+
#[test]
|
1435
|
+
fn test_multiple_blank_lines_in_yaml() {
|
1436
|
+
// Multiple blank lines should also be allowed
|
1437
|
+
let markdown = r#"---
|
1438
|
+
title: Test
|
1439
|
+
|
1440
|
+
|
1441
|
+
author: John Doe
|
1442
|
+
|
1443
|
+
|
1444
|
+
version: 1.0
|
1445
|
+
---
|
1446
|
+
|
1447
|
+
Body content."#;
|
1448
|
+
|
1449
|
+
let doc = decompose(markdown).unwrap();
|
1450
|
+
|
1451
|
+
assert_eq!(doc.get_field("title").unwrap().as_str().unwrap(), "Test");
|
1452
|
+
assert_eq!(
|
1453
|
+
doc.get_field("author").unwrap().as_str().unwrap(),
|
1454
|
+
"John Doe"
|
1455
|
+
);
|
1456
|
+
assert_eq!(doc.get_field("version").unwrap().as_f64().unwrap(), 1.0);
|
1457
|
+
}
|
1317
1458
|
}
|
1318
1459
|
#[cfg(test)]
|
1319
1460
|
mod demo_file_test {
|
@@ -3,7 +3,7 @@ name = "quillmark-fixtures"
|
|
3
3
|
version.workspace = true
|
4
4
|
edition.workspace = true
|
5
5
|
description = "Test fixtures and utilities for Quillmark"
|
6
|
-
license =
|
6
|
+
license.workspace = true
|
7
7
|
publish = false # Don't publish test fixtures to crates.io
|
8
8
|
readme = "README.md"
|
9
9
|
|
@@ -55,7 +55,7 @@ Ideal for content-heavy sites where each item needs its own metadata (price, cat
|
|
55
55
|
## Technical Details
|
56
56
|
|
57
57
|
- **Tag pattern**: `[a-z_][a-z0-9_]*`
|
58
|
-
- **
|
59
|
-
- **Horizontal rules**:
|
58
|
+
- **Blank lines**: Allowed within metadata blocks
|
59
|
+
- **Horizontal rules**: `---` with blank lines both above and below
|
60
60
|
- **Reserved names**: Cannot use `body` as tag directive
|
61
61
|
- **Collections**: Same tag name creates array of objects
|
@@ -83,7 +83,12 @@ comments:
|
|
83
83
|
#exceptionally_qualified:
|
84
84
|
examiner_remarks:
|
85
85
|
mission_description: Delivering packages to all points in the universe.
|
86
|
-
discrepancies:
|
86
|
+
discrepancies: |
|
87
|
+
Fry, we need to talk about your performance. Again. Your delivery times are consistently late - and I mean *consistently*. Every single package arrives after the guaranteed delivery window, which means I have to spend half my day apologizing to angry customers while you stand there with that vacant expression asking if we can stop for pizza. This isn't a joyride through the galaxy. This is a business, and you're single-handedly destroying our reputation one tardy delivery at a time.
|
88
|
+
|
89
|
+
And while we're on the subject, you smell like burning hair. I don't know what you're doing in your spare time, and honestly I don't want to know, but it's affecting the whole crew. Bender actually complained about a smell, Fry. *Bender*. A robot who stores week-old sandwiches in his chest cavity said you're making the ship uninhabitable. Whatever you're burning, stop burning it. Or at least shower afterwards.
|
90
|
+
|
91
|
+
Look, I'm sure you did your best, which is to say you failed miserably. I've tried to be patient. I've tried to work with your... limitations. But at this point, maybe you should stick to the one thing you're good at - nothing. Actually, scratch that. You're not even good at nothing. You somehow manage to make nothing worse just by being near it.
|
87
92
|
addi_training: You need to learn how to not be you
|
88
93
|
addi_comments: None
|
89
94
|
reviewing_remarks: None
|
@@ -5,7 +5,7 @@ edition.workspace = true
|
|
5
5
|
include.workspace = true
|
6
6
|
readme = "README.md"
|
7
7
|
description = "Typst backend for Quillmark"
|
8
|
-
license =
|
8
|
+
license.workspace = true
|
9
9
|
documentation = "https://docs.rs/quillmark-typst"
|
10
10
|
homepage = "https://github.com/nibsbin/quillmark"
|
11
11
|
repository = "https://github.com/nibsbin/quillmark"
|
@@ -107,8 +107,6 @@ pub fn date_filter(_state: &State, mut value: Value, kwargs: Kwargs) -> Result<V
|
|
107
107
|
// Use js-sys to get the current UTC date string on wasm targets.
|
108
108
|
// We format as YYYY-MM-DD to match Iso8601::DEFAULT parsing expectations.
|
109
109
|
use js_sys::Date;
|
110
|
-
use wasm_bindgen::JsValue;
|
111
|
-
|
112
110
|
let d = Date::new_0();
|
113
111
|
let year = d.get_utc_full_year() as i32;
|
114
112
|
let month = (d.get_utc_month() as u8).saturating_add(1);
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/appreciated_letter/Quill.toml
RENAMED
File without changes
|
File without changes
|
{quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/appreciated_letter/glue.typ
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{quillmark-0.4.0 → quillmark-0.4.1}/quillmark-fixtures/resources/usaf_memo/assets/dow_seal.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|