Comments (9)
from mdless.
from mdless.
Yeah, I discovered that the hard way :D
Anyway, other markdown tools work with that kind of syntax, which makes mdless not render properly markdown files that are written like that ...
But the scary thing is that mdless crashses on some conditions as explained above 😅
Example of that incorrect markdown rendering in github:
- something
some code
- other thing
from mdless.
from mdless.
I understand your point of view, but as a user, I want a tool I can use with files I did not produce. At least for me, it is the main use of mdless :)
However, the big concern is not that something is rendered incorrectly, but that the app crashes, and thus nothing is rendered
from mdless.
from mdless.
Here is how it looks when it does not render the code block properly, but the file is processed anyway:
And here is what happens when it crashes:
from mdless.
This is unfortunate as I get the same exact error with very little ability to understand why the parsing is broken.
mdless index.md
[⠋] Processing index.md...#<Thread:0x00000001249961a8 /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/tty-spinner-0.9.3/lib/tty/spinner.rb:308 run> terminated with exception (report_on_exception is true):
[⠙] Processing index.md.../usr/local/Cellar/mdless/2.1.42_1/libexec/gems/mdless-2.1.42/lib/mdless/array.rb:5:in `longest_element': undefined method `last' for nil (NoMethodError)
group_by(&:size).max.last[0]
^^^^^
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/mdless-2.1.42/lib/mdless/console.rb:69:in `hilite_code'
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/mdless-2.1.42/lib/mdless/console.rb:198:in `block_code'
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/mdless-2.1.42/lib/mdless/converter.rb:346:in `render'
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/mdless-2.1.42/lib/mdless/converter.rb:346:in `block (2 levels) in initialize'
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/tty-spinner-0.9.3/lib/tty/spinner.rb:225:in `execute_job'
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/tty-spinner-0.9.3/lib/tty/spinner.rb:308:in `block in run'
/usr/local/Cellar/mdless/2.1.42_1/libexec/gems/mdless-2.1.42/lib/mdless/array.rb:5:in `longest_element': undefined method `last' for nil (NoMethodError)
group_by(&:size).max.last[0]
^^^^^
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/mdless-2.1.42/lib/mdless/console.rb:69:in `hilite_code'
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/mdless-2.1.42/lib/mdless/console.rb:198:in `block_code'
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/mdless-2.1.42/lib/mdless/converter.rb:346:in `render'
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/mdless-2.1.42/lib/mdless/converter.rb:346:in `block (2 levels) in initialize'
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/tty-spinner-0.9.3/lib/tty/spinner.rb:225:in `execute_job'
from /usr/local/Cellar/mdless/2.1.42_1/libexec/gems/tty-spinner-0.9.3/lib/tty/spinner.rb:308:in `block in run'
The markdown is GHFM.
from mdless.
from mdless.
Related Issues (20)
- math equations ($$) HOT 3
- how to set image width and height HOT 7
- `GIT_PAGER=mdless git log` hangs HOT 3
- Request support for Alactritty Terminal Emulator HOT 2
- How to use built-in pager? HOT 4
- Display multiple sections with '-s' HOT 7
- Rendering headers & paragraphs HOT 2
- In contrast to less: mdless doesn't adapt to changing view port of terminal HOT 21
- Code Block rendering shows additional newlines if code block is indented too much HOT 2
- Snap install trying to access '/etc/gitconfig' HOT 7
- 2.0.3 build issue HOT 2
- Table inherit its size from previous table in the file HOT 4
- Not compatible with watch HOT 2
- Strange behaviour when opening in a "small terminal" HOT 4
- Is v2.1.3 the latest release? HOT 6
- empty character in codeblock doesn't work anymore HOT 11
- Ubuntu 20.04, Ruby 2.7.0p0, mdless 2.1.28 gem - syntax error in `string.rb` HOT 4
- Error in convertor.rb HOT 2
- 404 error from gem file on "rake install" HOT 1
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 mdless.