CSSUoB / CSSUoB/cssuob.github.io

Allow YAML string fields to be explicitly quoted when serialising front matter

オープン
#938 コメント 0 件 リアクション 0 件 担当者 1 名 @gellowg が担当を希望しています GitHub で見る
bug
主要言語
HTML
スター
29
フォーク
44
平均マージ
3日 16時間
マージ済み PR(30日)
15

説明

I have run into an interoperability issue when a string field contains a value such as a 24-hour time.

For example, if a collection contains:
```
- label: "Start Time"
name: "start_time"
widget: "string"
```

If I enter: `18:30`, decap serialises it as `start_time: 18:30`.

I think Decap correctly treats this as a string. However, Jekyll’s YAML parsing interprets the unquoted value 18:30 using YAML 1.1 sexagesimal notation, resulting in: `1110`.

This means the value is rendered by Jekyll as 1110/1110.0 rather than 18:30.

Quoting the value fixes the issue:
`start_time: "18:30"`

## Expected behaviour
Given: `18:30`, Decap would serialise this to: `start_time: "18:30"`.

## Current behaviour
Decap serialises: `start_time: 18:30`

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。