**Question:** Why can't I compile when a [Source Code Filter 
file](https://nim-lang.org/docs/filters.html) has more than 32.748 chars in a 
single line?

I have chart from draw.io inlined with HTML in one of my *.tmpl files ( _to-be 
nimf_ ). This has worked in 0.19.*, but breaks in 0.20.0. The problem is, when 
the length of a single line is equal to or longer than 32.749 chars. When 
breaking the line into multiple lines it compiles fine.

After finding the error above, I also discovered, that a string had a maximum 
of 32.752:

  * When a string length is >= 32.754 RangeError is returned.
  * When a string length is == 32.753 OverFlow is returned.
  * When a string length is =< 32.752 it compiles fine.



The 32.752 chars is corresponding to the char-length + newline chars in my 
*.tmpl file. Is 32.752 the maximum length of a string?

The compiling breaks even though the line is commented out (#).

Try this [Play Nim xi](http://ix.io/1Lnj/nim)

* * *

**Error messages in the *.tmpl file**

_I have a gist which can be used to test it. It has a tmpl code with 32.750 
chars (https: //gist.github.com/ThomasTJdev/404866d90ee0bdcec2a0da8dc97c4c87)_

The original inline HTML code was 511.102 chars and breaks the compiling with 
the following error message _(a single string >= 32.754)_: 
    
    
    
/Users/travis/build/nim-lang/nightlies/nim/e7471cebae2a404f3e4239f199f5a0c422484aac/lib/system/fatal.nim(48)
 sysFatal
    Error: unhandled exception: value out of range: -1 [RangeError]
    
    
    Run

When I resize the size to **exactly** 32.749 chars I get the following error 
message _(a single string = 32.753)_ : 
    
    
    
/Users/travis/build/nim-lang/nightlies/nim/e7471cebae2a404f3e4239f199f5a0c422484aac/lib/system/fatal.nim(39)
 sysFatal
    Error: unhandled exception: over- or underflow [OverflowError]
    
    
    Run

Resizing to 32.748 chars it compiles fine _(a single string <= 32.752)_.

Reply via email to