Comments (7)
I could open a pull request if this is required. inspect.lua could check to see if each character is outside the printable range (20 - 126 inclusive) and then replace it with an escape sequence...
from inspect.lua.
Actually, hold on one minute.
inspect.lua/spec/inspect_spec.lua
Lines 41 to 44 in b611db6
Test case...
from inspect.lua.
So the problem is only with \127?
from inspect.lua.
from inspect.lua.
I didn't notice this issue was open, apologies for that.
Some people consider the DEL character (char code 127) as "printable". I must have used some resource that did that, but TBH I didn't even think about it. I believe that it should be displayed. I will mark this as a bug.
from inspect.lua.
Some people consider the DEL character (char code 127) as "printable".
Control characters shouldn't be output verbatim, even if lua strings are completely binary safe, since inspect.lua's purpose is to output something to be read by a person, at least as far as I know.
from inspect.lua.
Thanks for reporting this, I have released a fix that should properly escape DEL and released a new version of the luarock with it.
from inspect.lua.
Related Issues (20)
- Add unrolling visited tables HOT 1
- Incompatible with luvit or the Discordia library HOT 16
- custom __metatable metafield that is not nil or table breaks inspecting HOT 3
- Printing with metatable's "__tostring" if userdata has it? HOT 9
- Error when inspecting table returned by luaposix.dir HOT 3
- "Array"-style display option for tables HOT 2
- Error: attempt to compare number with nil HOT 3
- Can you please make metatables output optionally disablable? HOT 5
- Option to display strings with newlines as multi-line strings HOT 1
- Use dofile in Gideros HOT 1
- Looks strange with `inspect {{ x = 1 }}` HOT 3
- PERF: countCycles doesn't respect options.depth HOT 1
- No option to print lua table in one line HOT 1
- How to remove `<table id>`? HOT 2
- Lua crashes when inspecting _G HOT 6
- Idea: integration with middleclass
- compat requirement unmentioned in installation guide HOT 1
- inspect option to output binary value as hex codes instead of escaped characters
- Use LuaBuffers in LuaJIT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inspect.lua.