summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2024-04-20refactor: move markdown-to-html parser into mdparse.rsLars Wirzenius4-248/+264
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2024-01-07cli: If no template available, don't lint the implsDaniel Silverstone1-1/+6
2024-01-07md: Fix up a little clippy warningsDaniel Silverstone1-3/+3
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-12-27bindings: Add warnings for missing capture names or missing capture typesDaniel Silverstone4-11/+56
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-12-27bindings: Remember filename when loading bindingsDaniel Silverstone1-25/+123
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-12-25feat: typeset scenarios by typesetting stepsLars Wirzenius9-94/+220
Typeset each step in a scenario, including captures in the steps. Previously the scenario was just one <pre> element, now things can be styled with CSS. Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-12-25refactor: move CSS file out of doc.rsLars Wirzenius2-8/+11
Make it easier to edit the CSS file, and also add some styles for upcoming scenario typesetting. Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-12-01feat: make libdocgen fail if a binding lacks a doc stringLars Wirzenius2-3/+21
The --merciful option allows this if the user really wants it. Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-11-11Merge branch 'fix-320' into 'main'Lars Wirzenius1-2/+4
Make bindings parsing more strict, and validate that strictness Closes #320 See merge request subplot/subplot!364
2023-11-11Merge branch 'liw/libdoc' into 'main'Daniel Silverstone2-15/+125
feat: generate library documentation from bindings files Closes #341 See merge request subplot/subplot!362
2023-11-11bindings: Be more strict about fields in bindings filesDaniel Silverstone1-2/+4
2023-11-04feat: generate library documentation from bindings filesLars Wirzenius2-15/+125
Add a `doc` field to a binding. It's a string meant to contain markdown. Add subcommand `subplot libdocgen YAML -o MD` to read a bindings file and output a markdown file documenting the steps in the bindings file, and the type of captures, and the documentation for the step. Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-10-31feat: add some HTML class attributesLars Wirzenius1-1/+11
This is a start. We'll need to add more as we add more support for styling the output. Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-10-31div for page body classLars Wirzenius1-0/+1
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-10-30feat: allow adding CSS URLs to HTML outputLars Wirzenius2-0/+22
This is in the meta data field "css_urls". Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-10-30feat: allow .subplot to list CSS files to embed in HTML outputLars Wirzenius2-0/+22
This is in the meta data field "css_embed". Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-10-21feat: insert a Table of Contents into generated HTMLLars Wirzenius3-6/+257
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-10-09fix: add img alt attributes for diagrams and other imagesLars Wirzenius2-10/+14
They're not great, but we can't make them great without forcing the user to specify a caption for each diagram. Sponsored-by: author
2023-10-09fix: drop unwanted, custom attributes that Subplot usesLars Wirzenius2-3/+14
Sponsored-by: author
2023-10-09fix: only one of each attribute per HTML elementLars Wirzenius1-2/+34
Sponsored-by: author
2023-10-09fix: have only one <body> in a serialized HTML pageLars Wirzenius1-2/+4
Sponsored-by: author
2023-10-09fix: add an HTML5 doctype to the serialized HTMLLars Wirzenius1-1/+4
Sponsored-by: author
2023-08-12subplot: Enable passing of location into the template expansionDaniel Silverstone6-3/+33
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-08-12steps: Pass location information into scenarios and scenario steps for error ↵Daniel Silverstone5-32/+71
messages Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-07-02feat! drop support for bibliographies in document metadataLars Wirzenius3-40/+0
We don't use the bibliographies for anything so there's not point in allowing users to specify it. If and when we add support for bibliographies again, we may well want to do it in a different way. Alas, we also have to disable reference.md because the release it refers to uses bibliographies. We'll have to re-enable it again after the next release. Sponsored-by: author
2023-06-21refactor: rename Document::files to ::embedded_filesLars Wirzenius4-8/+12
This makes it more clear what kind of files we're talking about. The old name could've meant, say, the markdown files. Sponsored-by: author
2023-06-21refactor: inline Document::from_ast to its only call siteLars Wirzenius1-20/+4
The extra method doesn't provide anything useful to it's better inline. Sponsored-by: author
2023-06-15refactor: change Document::to_html to return a ResultLars Wirzenius2-3/+3
HTML generation uses write!, which can fail, so to_html must return a Result. Sponsored-by: author
2023-06-15chore: drop unnecessary fixmeLars Wirzenius1-1/+0
If we ever need a class other than .pikchr, the comment won't help us. Sponsored-by: author
2023-06-15chore: drop now-pointless fixmeLars Wirzenius1-1/+0
Sponsored-by: author
2023-06-10feat: Warn when named codeblocks lack classesDaniel Silverstone4-1/+49
To both improve debugability when writing scenarios, and also to protect against future incompatibilities which might occur if we add more classes which are appropriate for named code blocks, we require that named blocks have one of `file` or `example` as classes or else we warn. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-06-07feat! don't allow indented scenario stepsLars Wirzenius2-1/+9
Some day we will have syntax for continuing a step to the next line. This change makes it easier to introduce that syntax, without a breaking change. Sponsored-by: author
2023-06-06Merge branch 'liw/not-cwd' into 'main'Daniel Silverstone1-1/+7
fix: allow docgen to handle a subplot not in current directory Closes #324 See merge request subplot/subplot!336
2023-06-06fix: typos and language for MdErrorLars Wirzenius1-4/+4
Sponsored-by: author
2023-06-03fix: allow docgen to handle a subplot not in current directoryLars Wirzenius1-1/+7
Sponsored-by: author
2023-06-03(debug): Remove unnecessary 'ok' debugDaniel Silverstone1-2/+0
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-05-31feat! docgen always outputs a documentLars Wirzenius1-23/+3
We have long had a feature for docgen that checks the time stamps of all input files and the output file and avoids running Pandoc to produce the output file, if the output file won't change. This has always been a little imperfect: sometimes the output file would change due to other changes than what's in the input files. For example, when Pandoc changes, or when Subplot code changes. This has led to surprised users. We no longer user Pandoc at all. Drop the time stamp checking functionality and have docgen always write the output file. Sponsored-by: author
2023-05-19tests: verify that Subplot reports specific errors with locationLars Wirzenius3-20/+28
Sponsored-by: author
2023-05-19chore: drop unused error variantLars Wirzenius1-3/+0
Sponsored-by: author
2023-05-19chore: drop unused SubplotError::AstLars Wirzenius1-4/+0
Sponsored-by: author
2023-05-19feat: add location information to markdown parsing errorsLars Wirzenius3-64/+153
Sponsored-by: author
2023-05-14feat: check for duplicate scenario titlesLars Wirzenius2-0/+20
Sponsored-by: author
2023-05-10feat! allow multiple markdown files for a subplotLars Wirzenius3-27/+71
Sponsored-by: author
2023-05-10refactor: move document metadata out of Markdown structLars Wirzenius3-62/+56
It's _document_ metadata, not metadata for a specific markdown file. It belongs in Document, not Markdown. Make it so. Sponsored-by: author
2023-04-30chore: drop now-obsolete commentLars Wirzenius1-2/+0
Thank you Milo Moisson. Sponsored-by: author
2023-04-30fix: extraction of plain text in scenario titlesLars Wirzenius1-3/+11
When I changed Subplot to use pulldown_cmark for parsing markdown, I introduced a bug: if a scenario title uses markup (e.g., bold face), that part of the title was dropped when it was converted into scenario title. Fix that. Sponsored-by: author
2023-04-24fix(src/codegen.rs): formattingLars Wirzenius1-3/+3
Sponsored-by: author
2023-04-10(chore): Update for newer base64 APIDaniel Silverstone2-3/+5
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2023-04-08chore(src/diagrams.rs): drop pointless commentLars Wirzenius1-2/+0
This was probably a copy-paste error. Sponsored-by: author
2023-04-08chore: drop Pandoc stuff as a Rust depenendencyLars Wirzenius1-7/+0
Sponsored-by: author