mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 12:46:08 +01:00
User strings were used as-is in certain parts since they were taken directly from `info.yaml`, but this could sometimes cause the datasheet build to fail since they've found a way (intentionally or not) to escape the content box that they were in. This commit attempts to address this issue by: - Sanitising user input using regex - Using Typst's `str()` function instead of content boxes where possible - Clarifying syntax in certain sections Hopefully these changes will remove (or at least reduce) the chances of someone breaking the build.
45 lines
1.0 KiB
Plaintext
45 lines
1.0 KiB
Plaintext
#import "/tt/docs/typst/src/tt.typ" as tt
|
|
#let horizontalrule = tt.lib.horizontalrule()
|
|
#let blockquote = tt.lib.blockquote
|
|
|
|
#show: tt.datasheet.project.with(
|
|
title: {{&project_title}},
|
|
author: {{&project_author}},
|
|
repo_link: "{{project_repo_link}}",
|
|
description: {{&project_description}},
|
|
address: "{{&project_address}}",
|
|
clock: "{{project_clock}}",
|
|
type: "{{project_type}}",
|
|
{{#is_wokwi}}
|
|
wokwi_id: "{{project_wokwi_id}}",
|
|
{{/is_wokwi}}
|
|
{{#is_dangerous}}
|
|
danger_level: "{{project_danger_level}}",
|
|
danger_reason: "{{project_danger_reason}}",
|
|
{{/is_dangerous}}
|
|
)
|
|
|
|
{{&project_doc_body}}
|
|
|
|
= Project Pinout
|
|
== Digital Pins
|
|
#align(center)[#table(
|
|
columns: 4,
|
|
align: left,
|
|
table.header(
|
|
[\#], [Input], [Output], [Bidirectional]
|
|
),
|
|
{{&digital_pins}}
|
|
)]
|
|
|
|
{{#is_analog}}
|
|
== Analog Pins
|
|
#align(center)[#table(
|
|
columns: 3,
|
|
align: left,
|
|
table.header(
|
|
[`ua`\#], [`analog`\#], [Description]
|
|
),
|
|
{{&analog_pins}}
|
|
)]
|
|
{{/is_analog}} |