-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
web-beautify-js erases whole buffer #6034
Comments
I can't reproduce that. Do you have the latest version of the packages? Have you tried calling |
Probably related to this issue: nodejs/node#6563. |
js-beautify errors when invoking like this: $ js-beautify -f mtc.simple.json
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.dirname (path.js:1324:5)
at Object.processInputSync (/usr/local/lib/node_modules/js-beautify/js/lib/cli.js:311:24)
at Array.forEach (native)
at Object.exports.interpret (/usr/local/lib/node_modules/js-beautify/js/lib/cli.js:199:19)
at Object.<anonymous> (/usr/local/lib/node_modules/js-beautify/js/bin/js-beautify.js:4:5)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
Run `js-beautify -h` for help. But works when piping the file from stdin: js-beautify < mtc.simple.json
{
"PA": "MAN Truck & Bus AG, 80995, M\u00fcnchen, DE",
"GT": "Abschrankungskonstruktion f\u00fcr einen Rollstuhlplatz in einem Fahrzeug",
"AD": "20131009",
"MC": [
"A61G",
"A61G0003",
"A61G000308"
],
"DE": "102013016746",
"AN": "DE102013016746",
"PC": "DE",
"AB": "<p num=\"0000\">Die Erfindung betrifft eine Abschrankungskonstruktion (100) f\u00fcr einen Rollstuhlplatz in einem Fahrzeug, vorzugsweise in einem Omnibus. Die Abschrankungskonstruktion (100) umfasst ein Oberteil (1) und ein Unterteil (2) zur Montage an das Fahrzeug und eine mit dem Oberteil (1) und dem Unterteil (2) verbundene Abschrankungseinrichtung (3). Die Abschrankungskonstruktion (100) zeichnet sich insbesondere dadurch aus, dass die Abschrankungseinrichtung (3) relativ zu dem Oberteil (1) und dem Unterteil (2) translatorisch in eine eingefahrene Stellung und eine oder mehrere ausgefahrene Stellungen verschiebbar ist.<\/p><p num=\"\"><de-figure num=\"0\"><\/de-figure><\/p>",
"IN": [
"Kittel, Ralf, 80939, M\u00fcnchen, DE",
"Schmerbeck, Franz, 94522, Wallersdorf, DE"
],
"IC": [
"A61G",
"A61G0003",
"A61G000308"
],
"KI": "A1",
"DP": "20150409"
} Hope that helps. |
What's the progress about this issue? |
Looks like an upstream issue to me. Especially thanks to @neonsamurai's comment. |
The issue does not occur to me anymore. Seems to be an upstream issue.
Maybe related to some node dependency.
Boris <[email protected]> schrieb am Fr. 23. Dez. 2016 um 13:41:
… Looks like an upstream issue to me. Especially thanks to @neonsamurai
<https://github.com/neonsamurai>'s comment.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6034 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABgld-4WTt9cpGOy91iSj6PEL3NgQDe2ks5rK8GEgaJpZM4Ic4gU>
.
|
@neonsamurai |
It means that the problem is likely not within Spacemacs but one of the
libraries used by web-beautify and this out of direct control of the
Spacemacs team.
Leo Hui <[email protected]> schrieb am Fr. 23. Dez. 2016 um 16:03:
… @neonsamurai <https://github.com/neonsamurai>
what means an upstream issue?
Should I combine some code?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6034 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABgld5epiB3R_ngY0OlCSWmKCqzueKz4ks5rK-LbgaJpZM4Ic4gU>
.
|
@neonsamurai |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
Description
When invoking 'web-beautify-js' in JSON mode, for example by pressing
, =
orSPC m =
the whole buffer is erased on many JSON files.Reproduction guide
SPC m =
or, =
)Observed behaviour:
The buffer is erased, resulting in an empty buffer.
Expected behaviour:
The JSON in the buffer should be pretty printed.
Notes
When invoking 'json-mode-beautify' by pressing
C-c C-f
(while JSON mode is active) the buffer is pretty printed as expected.System Info
Backtrace
mtc.simple.json.txt
The text was updated successfully, but these errors were encountered: