Skip to content

Conversation

pionxzh
Copy link
Collaborator

@pionxzh pionxzh commented Aug 26, 2024

closes #492

This PR adds the ability to show a comma at the end of the line.
The initial goal of adding this is to allow the end user to select any part of the json view to copy valid json string. This PR also fixed a few edge cases to achieve the goal. But some special data types like Date, Function, BigInt, undefined and null are not rendered in a JSON-valid way. You will have to override their display or disallow these data in the source value.

image

@netlify
Copy link

netlify bot commented Aug 26, 2024

Deploy Preview for any-viewer ready!

Name Link
🔨 Latest commit f503dde
🔍 Latest deploy log https://app.netlify.com/sites/any-viewer/deploys/66ccc90791075b00089dcc28
😎 Deploy Preview https://deploy-preview-509--any-viewer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 86.20690% with 12 lines in your changes missing coverage. Please review.

Project coverage is 67.89%. Comparing base (0b4393b) to head (f503dde).
Report is 10 commits behind head on main.

Files Patch % Lines
docs/pages/full/index.tsx 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #509      +/-   ##
==========================================
+ Coverage   67.53%   67.89%   +0.35%     
==========================================
  Files          37       37              
  Lines        3462     3535      +73     
  Branches      437      445       +8     
==========================================
+ Hits         2338     2400      +62     
- Misses       1111     1122      +11     
  Partials       13       13              

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

@socket-security
Copy link

@pionxzh pionxzh changed the title Comma feat: support displayComma for showing comma Aug 26, 2024
@pionxzh pionxzh merged commit 476bf3c into TexteaInc:main Aug 26, 2024
@pionxzh pionxzh deleted the comma branch August 26, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show json as is - add commas

1 participant