Skip to content

Commit

Permalink
Rename diagram_png_base64 to diagram_png_b64
Browse files Browse the repository at this point in the history
  • Loading branch information
kvid committed Jun 7, 2024
1 parent 9c5418c commit 0f9bf82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/wireviz/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ Note that there must be one single space between `--` and `%` at both ends.
| `<!-- %sheet_current% -->` | `1` (multi-page documents not yet supported) |
| `<!-- %sheet_total% -->` | `1` (multi-page documents not yet supported) |
| `<!-- %diagram% -->` | Embedded SVG diagram as valid HTML |
| `<!-- %diagram_png_base64% -->` | Embedded base64 encoded PNG diagram as URI |
| `<!-- %{item}% -->` | String or numeric value of `metadata.{item}` |
| `<!-- %{item}_{i}% -->` | Category number `{i}` within dict value of `metadata.{item}` |
| `<!-- %{item}_{i}_{key}% -->` | Value of `metadata.{item}.{category}.{key}` |
| `<!-- %diagram_png_b64% -->` | Embedded base64 encoded PNG diagram as URI |
| `<!-- %{item}% -->` | String or numeric value of `metadata.{item}` |
| `<!-- %{item}_{i}% -->` | Category number `{i}` within dict value of `metadata.{item}` |
| `<!-- %{item}_{i}_{key}% -->` | Value of `metadata.{item}.{category}.{key}` |

Note that `{item}`, `{category}` and `{key}` in the description above can be
any valid YAML key, and `{i}` is an integer representing the 1-based index of
Expand Down
2 changes: 1 addition & 1 deletion src/wireviz/wv_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def replacement_if_used(key: str, func: Callable[[], str]) -> None:

replacement_if_used("<!-- %diagram% -->", svgdata)
replacement_if_used(
"<!-- %diagram_png_base64% -->", lambda: data_URI_base64(f"{filename}.png")
"<!-- %diagram_png_b64% -->", lambda: data_URI_base64(f"{filename}.png")
)

# prepare metadata replacements
Expand Down

0 comments on commit 0f9bf82

Please sign in to comment.