1. aaaaaa

    29.05.2010

    0 ↑
    0 ↓
    Using IE8 on Win32.
    If I put a link inside the <pre>, IE gives an error and doesn't highlight properly. For example:

    <pre><code class="cpp">
    #include &lt;testpath/<a href="testfile_8h.html">testfile.h</a>&gt;

    virtual void testclass::function()
    {
    ...
    }
    </code></pre>



    Mozilla, Opera, and Safari render this fine.
  2. aaaaaa

    29.05.2010

    0 ↑
    0 ↓
    In fact, it seems that the presence of ANY html tag inside the <pre><code> confuses IE 8.
    :(
  3. Иван Сагалаев

    02.06.2010

    0 ↑
    0 ↓

    Which error it is? Sorry, my ability to test things in IE is quite limited (i.e. I don't have Windows at hand), so I'll need more info to debug it...

  4. Апача

    03.06.2010

    0 ↑
    0 ↓
    Я тоже столкнулся с подобной проблемой — любой тег внутри <pre><code> приводит
    к сообщению об ошибке в IE и подсветка не выполняется.
    Например:

    <PRE><CODE class="html">
    <B>Тест</B>&lt;P&gt;Текст
    </CODE></PRE>
  5. Dmitry

    03.06.2010

    0 ↑
    0 ↓
    It's strange, but on my Win7 64 in both IE8 64 and 32 there are no errors and highlighting works.
  6. Иван Сагалаев

    03.06.2010

    0 ↑
    0 ↓

    This might be not related to tags in code at all. We've fixed a couple of trailing commas that used to confuse IE. To original poster: can you check if the bug still exist in the latest trunk version? You can get it with bzr co http://softwaremaniacs.org/code/highlight/

  7. Dmitry

    03.06.2010

    0 ↑
    0 ↓
    Yes, IE can't handle things like {"blabla": "123", } so be sure to check for this.
  8. yuppy99.ya.ru

    03.06.2010

    0 ↑
    0 ↓

    Bug is at 338 line in highlight.js, some attribute nodes in IE have null nodeValue.

  9. zz

    03.06.2010

    0 ↑
    0 ↓
    @yuppy99.ya.ru

    there are also stream merging problem, and

    if(node.attributes[i].nodeValue && (node.attributes[i].nodeValue!='inherit'))

    does not solve it =(
  10. Иван Сагалаев

    03.06.2010

    0 ↑
    0 ↓

    I've pushed a fix that seems correct. Can anyone please test it!

Внимание! Это довольно старый топик, посты в него не попадут в новые, и их никто не увидит. Пишите пост, если хотите просто дополнить топик, а чтобы задать новый вопрос — начните новый.