Skip to content

Commit 1c2f096

Browse files
committed
feat: support floating-point fraction and fix some typos
1 parent eb94dc9 commit 1c2f096

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

content/en/docs/basics/wellknown-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ You should include the proto files provided by Tableau and Protocol Buffers:
5858
5959
A fraction represents a part of a whole or, more generally, any number of equal parts. See [wiki: Fraction](https://en.wikipedia.org/wiki/Fraction) for more details.
6060

61-
| Type | Default | Description |
62-
| ---------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
63-
| `fraction` | `0` | Format: <br>- `N%`: percentage, e.g.: `10%` <br>- `N‰`: per thounsand, e.g.: `10‰` <br>- `N‱`: per ten thounsand, e.g.: `10‱`<br>- `N/D`: simple fraction, e.g.: `3/4`<br>- `N`: only numerator, e.g.: `3` is same to `3/1` |
61+
| Type | Default | Description |
62+
| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
63+
| `fraction` | `0` | Format: <br>- `N%`: percentage, e.g.: `10%` <br>- `N‰`: per thounsand, e.g.: `10‰` <br>- `N‱`: per ten thounsand, e.g.: `10‱`<br>- `N/D`: simple fraction, e.g.: `3/4`<br>- `N`: only numerator, e.g.: `3` is same to `3/1`<br>- `N`: floating-point numerator, e.g.: `0.01` is same to `1/100` |
6464

6565
```protobuf
6666
message Fraction {

content/en/docs/design/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ Use [RFC 3339](https://tools.ietf.org/html/rfc3339) , which is following [ISO 86
278278
### Validation
279279

280280
- [x] unique: check map key uniqueness.
281-
- [x] range: `[left, right]`.
281+
- [x] range: `[left,right]`.
282282
- [ ] refer: `XXXConf.ID`. To be supported by [tableauio/loader](https://github.com/tableauio/loader).
283283

284284
### Error Message

content/en/docs/excel/field-property.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ toc: true
1515
| Option | Type | Description |
1616
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1717
| `unique` | bool | Check field uniqueness. <br> Default: `false`. Specially for map (or KeyedList) key, default will be auto deduced. |
18-
| `range` | string | Format: `"left, right"`. E.g.: `"1,10"`, `"1,~"`, `"~,10"`. <br> Different interpretations of range: <br> - number: value range. <br> - string: count of utf-8 code point. |
18+
| `range` | string | Format: `"left,right"`. E.g.: `"1,10"`, `"1,~"`, `"~,10"`. <br> Different interpretations of range: <br> - number: value range. <br> - string: count of utf-8 code point. |
1919
| `refer` | string | Format: `"SheetName(SheetAlias).ColumnName"`.<br>Ensure this field is in another sheet's column value space. Multiple refers are comma-separated. |
2020
| `sequence` | int64 | Ensure this field's value is a sequence and begins with this value. |
2121
| `default` | string | Use this default value if cell is empty. |
@@ -55,7 +55,7 @@ If you specify a general scalar field's property `unique` as true, then tableau
5555

5656
{{< alert icon="⚠️️" context="warning" text="This check option will not be applied if cell data is empty (not present). So if you still want to check even if cell data is empty, then you should set option `present` to true." />}}
5757

58-
Option `range` can be specified as format: `"left, right"` (left and right are both inclusive).
58+
Option `range` can be specified as format: `"left,right"` (left and right are both inclusive).
5959

6060
Different interpretations of `range`:
6161

content/en/docs/excel/list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Overview of horizontal list syntax:
2020
| List element type | Syntax example |
2121
| --------------------------------------------------------------------- | ------------------------------- |
2222
| [scalar](#horizontal-scalar-list) | `[]uint32` |
23-
| [enum](#horizontal-enum-list) | `[]enum<.FruiteType>` |
23+
| [enum](#horizontal-enum-list) | `[]enum<.FruitType>` |
2424
| [struct](#horizontal-struct-list) | `[Item]uint32` |
2525
| [predefined struct](#horizontal-predefined-struct-list) | `[.Item]uint32` |
2626
| [incell struct](#horizontal-incell-struct-list) | `[]{uint32 ID, string Num}Item` |

content/en/docs/excel/metasheet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,9 @@ If you set `Index` appropriately, then tableau loader plugins will generate inde
502502
Each column type can be:
503503

504504
- **scalar**: numbers, booleans, strings, and bytes.
505-
- **enum**: e.g.: `enum<.FruiteType>`
505+
- **enum**: e.g.: `enum<.FruitType>`
506506
- **incell scalar list**: e.g: `[]int32`
507-
- **incell enum list**: e.g: `[]enum<.FruiteType>`
507+
- **incell enum list**: e.g: `[]enum<.FruitType>`
508508

509509
Example: two worksheets *ItemConf* and *ShopConf* in HelloWorld.xlsx:
510510

content/en/docs/excel/wellknown-types.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,11 @@ A worksheet `ItemConf` in *HelloWorld.xlsx*:
278278

279279
{{< sheet colored>}}
280280

281-
| MinRatio | Ratio1 | Ratio2 | Ratio3 | Ratio4 |
282-
| --------- | ---------- | -------- | -------- | -------- |
283-
| fraction | []fraction | fraction | fraction | fraction |
284-
| min ratio | ratio1 | ratio 2 | ratio 3 | ratio 4 |
285-
| 1/4 | 10% | 10‰ | 10‱ | 10 |
281+
| MinRatio | Ratio1 | Ratio2 | Ratio3 | Ratio4 | Ratio5 |
282+
| --------- | ---------- | -------- | -------- | -------- | -------- |
283+
| fraction | []fraction | fraction | fraction | fraction | fraction |
284+
| min ratio | ratio1 | ratio 2 | ratio 3 | ratio 4 | ratio 5 |
285+
| 1/4 | 10% | 10‰ | 10‱ | 10 | 0.01 |
286286

287287
{{< /sheet >}}
288288

@@ -340,6 +340,10 @@ message ItemConf {
340340
{
341341
"num": 10,
342342
"den": 1
343+
},
344+
{
345+
"num": 1,
346+
"den": 100
343347
}
344348
]
345349
}

0 commit comments

Comments
 (0)