Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove non-breaking spaces from JSON strings and make JSON formatter replace nbsp with escape sequence #71069

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Jan 19, 2024

Summary

Infrastructure "Make JSON formatter replace nbsp with escape sequence"

Purpose of change

For some reason non-breaking spaces (\u00A0) snuck into some of the JSON files where they are not really needed, which is also interfering with the text style check and potentially text wrapping in-game.

Describe the solution

  1. Replace nbsp with normal space.
  2. Make nbsp stand out by replacing it with its escape sequence in the JSON formatter, so people can notice if nbsp is accidentally added, and nbsp can still be used in case it is actually needed.

Describe alternatives you've considered

Testing

Game loads.

Non-breaking spaces in JSON files are replaced with \u00A0 when formatted.

Additional context

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Mods Issues related to mods or modding [C++] Changes (can be) made in C++. Previously named `Code` Code: Tooling Tooling that is not part of the main game but is part of the repo. Mods: Xedra Evolved Anything to do with Xedra Evolved labels Jan 19, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Auto-requesting reviews from non-collaborators: @GuardianDll @jbytheway

@github-actions github-actions bot added the Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style label Jan 19, 2024
Copy link
Contributor

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • An English darling and icon of the First World War, the Short Magazine Lee-Enfield Mk III was the standard issue battle rifle of the British commonwealth from 1907. Chambered for .303 ammunition, the rifle makes use of ten-round detachable magazines. With its full-length wooden handguard, brass buttplate, and smooth action, the Lee-Enfield cuts a recognizable profile in either the trenches of the Great War or the zombie-strewn wastelands.
  • This is a sturdy cardboard box, stamped with manufacturer markings and emblazoned with the stylized image of an assembled rifle. Containing appropriate retool components for an average weapon platform, including upper receiver assemblies, swappable barrels, and assorted extras (such as magazines), its contents could be used to rechamber a compatible rifle.

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Jan 19, 2024
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 19, 2024
@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 20, 2024
@akrieger
Copy link
Member

akrieger commented Feb 3, 2024

You'll need to rebase it seems.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 4, 2024
@Maleclypse Maleclypse merged commit 93c658a into CleverRaven:master Feb 16, 2024
25 of 26 checks passed
@Qrox Qrox deleted the nbsp branch March 15, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Code: Tooling Tooling that is not part of the main game but is part of the repo. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Mods: Xedra Evolved Anything to do with Xedra Evolved Mods Issues related to mods or modding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants