Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(HTML encoding): Add support for encoding
CreativeWork
- Loading branch information
1 parent
cacbb15
commit 0d1217d
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
rust/codec-html/src/snapshots/encode_nodes@creative-work.json.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
source: rust/codec-html/src/encode.rs | ||
assertion_line: 425 | ||
expression: html | ||
input_file: fixtures/nodes/creative-work.json | ||
|
||
--- | ||
<article data-itemscope="root" itemtype="http://schema.stenci.la/CreativeWork" itemscope> | ||
<p itemtype="http://schema.stenci.la/Paragraph" itemscope> | ||
<span>A fixture that is a creative work containing code nodes.</span> | ||
<span>Why? Because in some circumstances, instead of nested, structured content (e.g. an `Article`),</span> | ||
<span>we want to use a flat array of nodes.</span> | ||
</p> | ||
<stencila-code-chunk itemtype="http://schema.stenci.la/CodeChunk" itemscope id="cc-1" programming-language=""> | ||
<meta itemprop="programmingLanguage" content=""/> | ||
<pre data-itemprop="text" slot="text"># Some code</pre> | ||
<stencila-code-dependencies slot="code-dependencies"> | ||
<div data-itemprop="codeDependencies"> | ||
</div> | ||
</stencila-code-dependencies> | ||
<stencila-code-dependencies slot="code-dependents"> | ||
<div data-itemprop="codeDependents"> | ||
</div> | ||
</stencila-code-dependencies> | ||
<div data-itemprop="outputs" slot="outputs"> | ||
<img itemtype="http://schema.org/ImageObject" itemscope src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mNkYvhfz0AEYBxVSF+FAA/eDwup9bzCAAAAAElFTkw"/> | ||
</div> | ||
<div data-itemprop="errors" slot="errors"> | ||
</div> | ||
<span data-itemprop="label" slot="label"> | ||
</span> | ||
<figcaption data-itemprop="caption" slot="caption"> | ||
</figcaption> | ||
</stencila-code-chunk> | ||
</article> |