jcubic / jquery.terminal

jQuery Terminal Emulator - JavaScript library for creating web-based terminals with custom commands
https://terminal.jcubic.pl
MIT License
3.11k stars 569 forks source link

Wrong rendered images when using `<img>` in less #970

Open jcubic opened 1 week ago

jcubic commented 1 week ago

Issue summary

When you use XML <img> tag with less, it doesn't split the image into slices and it shows the scrollbar.

Expected behavior

It should work the same as with terminal formatting.

Steps to reproduce

See demo https://codepen.io/jcubic/pen/poMoyMg

Browser and OS

N/A

Additional notes

The problem is an empty object for attributes that is the output of the XML formatter

jcubic commented 1 week ago

There were two issues:

  1. Wrong regex that test the image terminal formatting
  2. There is a need to use option { formatting: true }

The second need to be documented