Skip to content

Fix escaped quotes when rendering formulas - #23

Merged
xuri merged 2 commits into
xuri:masterfrom
otrumb:22-render-escaped-quotes
Sep 24, 2026
Merged

xuri merged 2 commits into
xuri:masterfrom
otrumb:22-render-escaped-quotes

Conversation

@otrumb

@otrumb otrumb commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Tokenizer stores doubled Excel quotes as one logical quote. Render emitted it raw and corrupted formula.

Fix

Re-encode logical embedded quotes as doubled quotes for text tokens.

RED exact output:

Render() = "\"a\"b\"", want "\"a\"\"b\""

GREEN:
TestRenderPreservesEscapedDoubleQuotes passes.

Verification

  • go test -run '^TestRenderPreservesEscapedDoubleQuotes$' ./...
  • go test ./...
  • go test -race -cover ./...
  • go vet ./...

Scope

  • Two files: efp.go, efp_test.go
  • No dependencies or API changes.

Fixes #22

Checklist

  • Tests added or updated
  • go test ./... passes
  • go test -race -cover ./... passes
  • go vet ./... passes
  • Scope limited to requested fix

otrumb and others added 2 commits September 23, 2026 13:05
Problem: Render emitted logical embedded quotes raw instead of Excel's doubled-quote encoding.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: Ngoc Trung <mr.trung.dhbk@gmail.com>
@xuri xuri added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 24, 2026
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9199f39) to head (48d8e02).

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #23   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          384       384           
=========================================
  Hits           384       384           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xuri xuri left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. I've made some changes based on your branch.

@xuri
xuri merged commit 217b819 into xuri:master Sep 24, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Render corrupts formulas with escaped double quotes

2 participants