Put a space between the commodity symbol and the quantity

Open Beginner friendly
#73 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
fsharp
Domain
backend

Research direction

Start in Amount.ToString, using AmountStyle.CommoditySpaced and the referenced BalanceReport.fs lines to trace the formatting. Update the expectations in Tabularius.Tests/Data/AmountTests.fs, and use Tabularius.Tests/Interop/BalanceReportTests.fs to confirm the spaced style is preserved. Done means a true value produces one space between the commodity symbol and quantity.

Written by the indexing model from the issue text.

Description

enhancement good first issue help wanted

Problem

The AmountStyle type has a CommoditySpaced field. Amount.ToString does not read this field. The method puts the commodity symbol directly before the quantity or directly after the quantity. The method never puts a space between these two parts.

Do these steps:

  1. Read AmountStyle.CommoditySpaced in Amount.ToString.
  2. Put one space between the commodity symbol and the quantity if the value of the field is true.
  3. Correct the tests in Tabularius.Tests/Data/AmountTests.fs. These tests hold the current behavior.

Why this task is necessary

hledger reports the space in the amount style. The interop layer keeps this data, and Tabularius.Tests/Interop/BalanceReportTests.fs shows the value. The program then removes the space when it shows the amount. The user sees 100USD in place of 100 USD.

Code

Dominant language
F#
Stars
1
Forks
0
Avg merge
12h 14m
Merged PRs (30d)
10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ForNeVeR/tabularius

All issues in ForNeVeR/tabularius

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.