diff options
Diffstat (limited to 'vhosts/blog/public/posts/2025-01-26/yaml-breaking-changes-between-v1-1-and-v1-2')
| -rw-r--r-- | vhosts/blog/public/posts/2025-01-26/yaml-breaking-changes-between-v1-1-and-v1-2/index.html | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/vhosts/blog/public/posts/2025-01-26/yaml-breaking-changes-between-v1-1-and-v1-2/index.html b/vhosts/blog/public/posts/2025-01-26/yaml-breaking-changes-between-v1-1-and-v1-2/index.html index a8f72a21..87efea12 100644 --- a/vhosts/blog/public/posts/2025-01-26/yaml-breaking-changes-between-v1-1-and-v1-2/index.html +++ b/vhosts/blog/public/posts/2025-01-26/yaml-breaking-changes-between-v1-1-and-v1-2/index.html @@ -14,8 +14,7 @@ <meta property="og:locale" content="ja_JP"> <link rel="icon" type="image/svg+xml" href="/favicon.svg"> <title>【YAML】YAML 1.1 と YAML 1.2 の主な破壊的変更|REPL: Rest-Eat-Program Loop</title> - <link rel="stylesheet" href="/style.css?h=79020a898c7052f79b32e90376a4497d"> - <link rel="stylesheet" href="/hl.css?h=340e65ffd5c17713efc9107c06304f7b"> + <link rel="stylesheet" href="/style.css?h=60eb349e583f5bd51518a7eb98598043"> </head> <body class="single"> <header class="header"> @@ -103,14 +102,16 @@ YAML 1.1 では、<code><<</code> という文字列をキーに指定することで、マップをマージすることができた。 </p> - <pre class="highlight" language="yaml"><code class="highlight"><span class="hljs-attr">x:</span> <span class="hljs-meta">&base</span> - <span class="hljs-attr">a:</span> <span class="hljs-number">123</span> -<span class="hljs-comment"># => { "x": { "a": 123 } }</span> - -<span class="hljs-attr">y:</span> - <span class="hljs-string"><<:</span> <span class="hljs-meta">*base</span> - <span class="hljs-attr">b:</span> <span class="hljs-number">456</span> -<span class="hljs-comment"># => { "y": { "a": 123, "b": 456 } }</span></code></pre> + <div class="codeblock" language="yaml"> + <pre class="shiki github-light" style="background-color:#f5f5f5;color:#24292e" tabindex="0"><code><span class="line"><span style="color:#22863A">x</span><span style="color:#24292E">: </span><span style="color:#D73A49">&</span><span style="color:#6F42C1">base</span></span> +<span class="line"><span style="color:#22863A"> a</span><span style="color:#24292E">: </span><span style="color:#005CC5">123</span></span> +<span class="line"><span style="color:#6A737D"># => { "x": { "a": 123 } }</span></span> +<span class="line"></span> +<span class="line"><span style="color:#005CC5">y</span><span style="color:#24292E">:</span></span> +<span class="line"><span style="color:#005CC5"> <<</span><span style="color:#24292E">: </span><span style="color:#D73A49">*</span><span style="color:#24292E">base</span></span> +<span class="line"><span style="color:#22863A"> b</span><span style="color:#24292E">: </span><span style="color:#005CC5">456</span></span> +<span class="line"><span style="color:#6A737D"># => { "y": { "a": 123, "b": 456 } }</span></span></code></pre> + </div> <p> 1.2 からはこれができなくなる。 |
