Coder Social home page Coder Social logo

syntaxhighlighter's People

Watchers

 avatar

syntaxhighlighter's Issues

CSS rendering problem

What steps will reproduce the problem?
1. CSS code ("<pre class="css:collapse" name="code">...</pre>"). Other
codes render properly.

What is the expected output? What do you see instead?
Indent is not the same for every lines. You can see how it renders on my
post at the "The CSS (stylesheet.css):":
http://web-kreation.com/blog/?p=19. Besides for "#menu ul li.right" there
is a reccurence of the word "right".


What version of the product are you using? On what operating system?
Version: SyntaxHighlighter 1.5.0
OS: linux (I don't know which version.
Blog system: Wordpress


Please provide any additional information below.
I attached a screenshot of the problem


Original issue reported on code.google.com by [email protected] on 4 Aug 2007 at 4:50

Attachments:

Use syntaxhighlighter on blogger.com

What steps will reproduce the problem?
1. use syntaxhighlighter on blogger.com with default setting.

What is the expected output? What do you see instead?
All code become one line, connected with <br />

What version of the product are you using? On what operating system?
1.5.0

Please provide any additional information below.

When use syntaxhighlighter on blogger.com with default setting, because
blogger.com will convert line breaks to <br />, and it will break the
syntaxhighlighter formatting. Although it is not syntaxhighlighter's
problem, but many people use blogger.com was confused with this problem.
May be syntaxhighlighter can add an option to handle this problem.

I provide a hardcode fix about this problem. 

Original issue reported on code.google.com by wctang on 4 Jul 2007 at 2:38

Attachments:

[PATCH] Add support for fetching source code from a remote URI.

Nice project.  I've attached a patch to shCore.js that allows you to load 
the source from a remote URI, which I find quite useful.  This would be 
done as follows:

<pre name="code" class="python:remote">enter/link/to/some/code.py</pre>

It's restricted to only fetching URIs from the same server (the default 
behaviour of XMLHttpRequest is to not allow open() on a different site).  

Needs a bit more work before it's production ready; the error messages 
need improving and it'd be nice to spruce up the aesthetics while it's 
loading the file.  (I don't know JavaScript so there may be better ways to 
implement what I've done as well.  I've kept the style consistent to yours 
though.)

Examples of it in the real world:
http://blogs.onresolve.com/?p=6
http://blogs.onresolve.com/?p=8

Full file is here: http://dark.teleri.net/~tnelson/shCore.js
Patch against trunk: http://dark.teleri.net/~tnelson/shCore.js.patch

Thoughts?


    Trent.



Original issue reported on code.google.com by [email protected] on 15 Oct 2007 at 1:05

Attachments:

validation problem

What steps will reproduce the problem?
1.
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.developer-network.org%2Fshowt
hread.php%3Ft%3D40&charset=%28detect+automatically%29&doctype=Inline&group=0


HI
what can i change to make the site complete valide?

Original issue reported on code.google.com by [email protected] on 28 Oct 2007 at 9:32

Java and Python crash with "Permission Denied"

What steps will reproduce the problem?
1. Open the attached file (after fixing the script paths)
2. Click on the 'JavaScript' button.  Works fine.
3. Click on the 'Java' or 'Python' buttons.  Breaks.

What is the expected output? What do you see instead?
  Expected output is to render the code.  Actual is to navigate to a blank
window and hang (Mozilla) or crash with 'permission denied' (IE).

What version of the product are you using? On what operating system?
1.5, XP.

Original issue reported on code.google.com by [email protected] on 25 Jun 2007 at 4:56

Attachments:

Copy to clipboard: whitespaces converted into &nbsp

1:When I try to copy to clipboard, and I paste the code in a file, its
whitespaces are converted into ' &nbsp; '. 

Ok, I could copy this code from "view plain", but I'm only reporting a
simple "bug"(?)

(please, see the attached image)

I think it shouldn't convert whitespace into ' &nbsp; '.

Bye




Original issue reported on code.google.com by [email protected] on 23 Oct 2007 at 9:24

Attachments:

Extreme slowness on certain code

What steps will reproduce the problem?
1. Render the following Java code:
// This comment has a ' character.
String text_delete = "";
// This comment has a ' character.
Diff nextDiff = null;
// This comment has a ' character.
while (nextDiff != null) {
  if (prevDiff.operation == Operation.EQUAL) {
    // This is a single edit surrounded by equalities.
    if (thisDiff.text.startsWith(nextDiff.text)) {
      // Shift the edit over the next equality.
      prevDiff.text += nextDiff.text;
      thisDiff.text = thisDiff.text.substring(nextDiff.text.length()) +
          nextDiff.text;
      pointer.remove(); // Delete nextDiff.
      changes = true;
    }
  }
}
// If shifts were made, the diff needs reordering and another shift sweep.
diff_cleanupMerge(diffs);

What is the expected output? What do you see instead?
  The output takes about 15 seconds to render.  Though once rendered, the
output is correct.

What version of the product are you using? On what operating system?
  1.5, Firefox, XP

Please provide any additional information below.
  Deleting almost any line causes it to render instantly.  The test case is
extremely fragile.  I've reduced it to the point where nearly all
simplifications make the problem vanish.

Because of the single quotes in the comments (removing a quote fixes the
issue), this may be related to bug 15.  Because of the apparent crash, this
may be related to bug 10 (I suspect if you hit 'continue' enough times, bug
10 would finally render, but if it's O(n^3), it might take a few years).

Original issue reported on code.google.com by [email protected] on 25 Jun 2007 at 2:22

VB script crashing IE and FF

What steps will reproduce the problem?
1. Attempt to syntax colour the attached VB file

What is the expected output? What do you see instead?

The script locks up both IE and Firefox.

What version of the product are you using? On what operating system?

1.5

Original issue reported on code.google.com by [email protected] on 9 Jun 2007 at 11:05

Attachments:

Trailing comma in shBrushPython regex list adds a null entry which confuses ie7

What steps will reproduce the problem?

1. browse to dp.SyntaxHighlighter/Python.html in ie7

What is the expected output? What do you see instead?

Expected syntax highlighting is not there, instead it looks like the whole 
xml node which containts the code disappears.

What version of the product are you using? On what operating system?

1.5.0 (according to test files)

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 24 May 2007 at 10:27

Attachments:

Margins in Tool Links when Using IE

What steps will reproduce the problem?
1. Look at the highlighted code in IE
2. Hoover over the tools links

What is the expected output? What do you see instead?
Links shift because of missing margin

What version of the product are you using? On what operating system?
1.5.1 on Windows XP in IE 6

Please provide any additional information below.
Just add the margin-right attribute to ".dp-highlighter .tools a:hover" as

.dp-highlighter .tools a:hover
{
    color: red;
    background-color: inherit;
    text-decoration: underline;
    margin-right: 10px;
}
{
    color: red;
    background-color: inherit;
    text-decoration: underline;
    margin-right: 10px;
}

Original issue reported on code.google.com by [email protected] on 5 Oct 2007 at 1:00

triple quoted python strings aren't recognized.

What steps will reproduce the problem?
1. Make a snippet in python with a triple quoted string.

[source:python]
    '''this is a multiline string
    blablabla 
    '''
"""This is also a multiline string"""
"""
as
is
this"""
[/source]

What is the expected output? What do you see instead?

It's obviously confused. See attached image.

What version of the product are you using? On what operating system?

Latest version, linux/apache/firefox


Original issue reported on code.google.com by [email protected] on 21 May 2007 at 3:57

Attachments:

Please Provide non-Rar Packages

Your previous releases were in .zip format; can you please package the
current and future releases as zip files too?

The reason I ask is that many Unix/Linux systems don't necessarily have RAR
software installed, nor do many Windows machines. Just about every OS has
an 'unzip' command built-in or already installed, though.

Original issue reported on code.google.com by [email protected] on 26 Oct 2007 at 1:47

[PATCH] css to avoid interference with local style

you blogger install include inside the html page :
<style>
....
.post div {
 line-height:1.3em;
 ...
}
...
</style>

because this rules is inside the html, and more "selective", it has higher
priority against imported SyntaxHiglighter 'css.
Then it display an ugly grey bar.

I attach a css that work for our case.
I replace :
* every selector .dp-highlighter by div.dp-highlighter
* clear style
/* clear styles */
div.dp-highlighter ol,
div.dp-highlighter ol li,
div.dp-highlighter ol li span 
{
    margin: 0;
    padding: 0;
    border: none;
}

by 
/* clear styles */
div.dp-highlighter *
{
    margin: 0;
    padding: 0;
    border: none;
    line-height: 1em;
}

Regards

Original issue reported on code.google.com by david.bernard.31 on 10 Dec 2007 at 7:50

Attachments:

Missing comments in php

What steps will reproduce the problem?
This application doesn't support # as a line comment in php;

Original issue reported on code.google.com by [email protected] on 28 Aug 2007 at 5:33

No syntax highlighted = no toolbar

There is a small bug in the Highlight function..

if(this.matches.length==0){
 :
 :
 return;
}

doesn't add the toolbar if there were no syntax matches.

Adding

this.div.appendChild(this.bar);

before 

this.div.appendChild(this.ol);

fixes this issue.

(I'm referring to the compressed source, sorry).

Original issue reported on code.google.com by [email protected] on 5 Jul 2007 at 12:55

Automatic language detection and support for another popular markup

1. I've added basic language detection code for C family and XML family
languages. And also added shBrushCFamily.js file. When user do not specify
language alias auto detection will be performed.

2. There's another popular markup for code (
http://xhtml.com/en/xhtml/reference/pre/ ). It recommends OL tag for more
semantically meaningful markup. So I've added support for this markup, too.

Please see attached patch

Original issue reported on code.google.com by [email protected] on 22 Nov 2007 at 4:55

Attachments:

document.write confuses firefox during an xsl transformation

What steps will reproduce the problem?

1. Set-up to render HTML by transforming an XML file with an XSL file
2. Render a language uses highlighter.Style (which causes a call to
document.write to write out the new styles).
NOTE: I've provided a test case which fails on Firefox with the current
code but succeeds with the provided patch.


What is the expected output? What do you see instead?

Expected is the highlighted text, instead (since the script fails right
before the highlighted text is inserted) nothing is seen.

The following error is logged in firebug:

element.parentNode has no properties
file:///.../syntaxhighlighter/Scripts/shCore.js
Line 693


What version of the product are you using? On what operating system?

1.5.0 -- as far as I know this fails on Firefox under all operating systems.


Please provide any additional information below.

Please see attached patch for fix and test case.

Original issue reported on code.google.com by [email protected] on 27 May 2007 at 8:01

Attachments:

Background colors not expanding when scrolling horizontally.

What steps will reproduce the problem?
1. Create a code block and then shrink the browser window until it scrolls
horizontally.  Should see that the background does not continue past the
viewport.

What is the expected output? What do you see instead?
Expectation: Background continue for total available scroll width.

What version of the product are you using? On what operating system?
1.5 Windows XP & Solaris 8

Please provide any additional information below.
I was implementing this component into Joomla so that I could highlight my
code samples when I first noticed this issue.

I then went to the samples included with the distribution and altered the
JavaScript example to use both the <pre> and <textarea> tags to determine
if it was affecting both or not.  It affects both.  Also, to see if this
was a page refresh issue or not I set the width of the containing div in
the sample file to 300px and got the same result.

Here is a sample of what I did in the sample file:

<div class="column2" style="width: 300px;">
Text body before.
<hr/>
<pre name="code" class="js">
/***********************************
 ** Multiline block comments
 **********************************/

// Hang test à partir de l`idagence / id type publication ``````

var stringWithUrl1 = "http://blog.dreamprojections.com";
var stringWithUrl2 = 'http://www.dreamprojections.com';

// callback for the match sorting
dpSyntaxHighlighter.prototype.SortCallback = function(m1, m2)
{
    // sort matches by index first
    if(m1.index < m2.index)
        return -1;
    else if(m1.index > m2.index)
        return 1;
    else
    {
        /*
        // if index is the same, sort by length
        if(m1.length < m2.length)
            return -1;
        else if(m1.length > m2.length)
            return 1;
        */
    }

    alert('hello // world');
    return 0;
}
</pre>


Attached is a screen shot of what I am seeing.

thanks.

Original issue reported on code.google.com by [email protected] on 17 May 2007 at 6:42

Attachments:

produced html stirct is not valid

What steps will reproduce the problem?
1. http://validator.w3.org/check
2. fails
3.

What is the expected output? What do you see instead?
validating html strict, a failing error

What version of the product are you using? On what operating system?
1.5.1

Please provide any additional information below.

To write validating html stirct a "name" attribute is not allowed in the
<pre> tag. Therefore this script should not use that attribute to identify
the code to modify. I have solved using just the class attribute, but
perhaps you find a better solution.
I would appreciate it if it could be used in a validating document.
Otherwise it is a good tool. Thank you!

~DR0ID

Original issue reported on code.google.com by [email protected] on 15 Aug 2007 at 7:04

JavaScript comments with ' character break highlighting

What steps will reproduce the problem?
1. Syntax highlight the following JavaScript:
// This comment has a ' character.  
line_ok();  
a_string = 'hello'; 
line_bad();
// This comment has a ' character.  

What is the expected output? What do you see instead?
  The ' in each comment causes "line_bad()" to be rendered as a string.

What version of the product are you using? On what operating system?
  1.5.0, Firefox & IE, Win XP.


Original issue reported on code.google.com by [email protected] on 25 Jun 2007 at 1:40

script hangs when code too large?

What steps will reproduce the problem?

go here first, this is the file im going to try to highlight next:
http://doesthatevencompile.com/current-projects/code-sniplets/GuiBrowsePanel.htm

no look at the highlighted file:
http://doesthatevencompile.com/current-projects/code-sniplets/GuiBrowsePanel-tes
t.htm


What is the expected output? What do you see instead?

highlighted file, script hangs

What version of the product are you using? On what operating system?

1.5.1

Please provide any additional information below.




Original issue reported on code.google.com by [email protected] on 15 Aug 2007 at 7:30

BloggerMode with Blogs adding adding <br> instead of replaceing \n with <br>

What steps will reproduce the problem?
1. Use a Blogging software like Apache Roller
2. Write a article with sourcecode, which is a multi-line source code
3. Enable BloggerMode within the SyntaxHighlighter

What is the expected output? What do you see instead?
I'd expect a clear result with no extra newlines and no <br> tags within
the sourcecode

What version of the product are you using? On what operating system?
1.51

Please provide any additional information below.
As it seems, blogger does replace \n with the <br /> tags. Differnt other
applications add an additional <br /> and leave the \n untouched.

This results in the behavior, that the highlighted code has the <br /> tags
removed properly but has an extra newline after every line of code.

A possible fix I could think of would be to add a configuration option the
BloggerMode method which sets a toggle whether its <br /> only or <br />\n
and changes the behavior of the FixForBlogger Method.

Right now, for my own Blog I just altered the shCore.js file and removed
changed the '\n' to '' within the FixForBlogger method, which works fine
for me.

Original issue reported on code.google.com by [email protected] on 26 Sep 2007 at 2:44

> is incorrectly copied to clipboard

What steps will reproduce the problem?
<pre name="code" class="vb">
Return (result > 0)
</pre>

What is the expected output?
Return (result > 0)

What do you see instead?
Return (result &gt; 0)

What version of the product are you using? 
Version 1.5

On what operating system?
Windows 2003 Server - IE7 & FF2

Original issue reported on code.google.com by [email protected] on 28 May 2007 at 9:56

Browser Crash

Highlighting the following code causes both IE and firefox to crash.  Not
sure why:



Part 1.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Treaple.com
{
    public partial class Form1 : Form
    {
        private CompareIP compareIP = null;
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            compareIP = new CompareIP();

            string Ip = txtIP.Text.Trim();
            string[] Ip_List = Ip.Split(".".ToCharArray());
            string X_Ip = "";

            foreach (string ip in Ip_List)
            {
                if (Convert.ToInt16(ip) < 16)
                    X_Ip += "0" + Convert.ToInt16(ip).ToString("x");
                else
                    X_Ip += Convert.ToInt16(ip).ToString("x");
            }

            long N_Ip = long.Parse(X_Ip,
System.Globalization.NumberStyles.HexNumber);
            compareIP.IPAddress = N_Ip;
            DataSet newdata = compareIP.GetIP();
            try
            {
                txtCountry.Text = newdata.Tables[0].Rows[0][2].ToString();
                txtCity.Text = newdata.Tables[0].Rows[0][3].ToString();
            }
            catch
            {
                MessageBox.Show("Invalid Ip address!");
            }
        }
    }
}

Part2.

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Treaple.com
{
    //////////////////////Base Class///////////////////////
    public abstract class DataExchange
    {
        public IPAccessDataBase accessDataBase;
        public abstract int AddData();
        public abstract int ChangeData();
        public abstract DataSet GetData();
    }

    //////////////////////Sub Class////////////////////////

    public class CompareIP
    {
        public IPAccessDataBase iPAccessDataBase;
        public long IPAddress;

        public CompareIP()
        {
            iPAccessDataBase = new IPAccessDataBase();
        }

        public DataSet GetIP()
        {
            return iPAccessDataBase.SelectData("select * from address where
" + this.IPAddress + " >=ip1 and " + this.IPAddress + " <= ip2", "address");
        }
    }
}

part3. 

using System;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;

namespace Treaple.com
{
    /// 
    public class IPAccessDataBase
    {
        private string strSQL;

        private string connectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +"c:\"+("IP.MDB"); 

        private OleDbConnection myConnection;
        private OleDbCommandBuilder sqlCmdBld;
        private OleDbDataAdapter da;

        private DataSet ds = new DataSet();

        public IPAccessDataBase()
        {
        }

        public IPAccessDataBase(string conStr)
        {
            connectionString = conStr;
        }

        public DataSet SelectData(string tempStrSQL, string tempTableName)
        {
            this.strSQL = tempStrSQL;
            this.myConnection = new OleDbConnection(connectionString);
            this.da = new OleDbDataAdapter(this.strSQL, this.myConnection);
            this.ds.Clear();
            this.da.Fill(ds, tempTableName);
            return ds;
        }

        public DataSet UpdateData(DataSet changedDataSet, string tableName)
        {
            this.myConnection = new OleDbConnection(connectionString);
            this.da = new OleDbDataAdapter(this.strSQL, this.myConnection);
            this.sqlCmdBld = new OleDbCommandBuilder(da);
            this.da.Update(changedDataSet, tableName);
            return changedDataSet;
        }



        public DataTable SelectData(string tempStrSQL)
        {
            this.myConnection = new OleDbConnection(connectionString);
            DataSet tempDataSet = new DataSet();
            this.da = new OleDbDataAdapter(tempStrSQL, this.myConnection);
            this.da.Fill(tempDataSet);
            return tempDataSet.Tables[0];
        }


        public int UpdateData(string tempStrSQL)
        {
            OleDbConnection myConnection = new
OleDbConnection(connectionString);
            OleDbCommand myCommand = new OleDbCommand(tempStrSQL);
            myCommand.Connection = myConnection;
            myConnection.Open();
            int intNumber = myCommand.ExecuteNonQuery();
            myCommand.Connection.Close();
            myConnection.Close();
            return intNumber;
        }
    }   
}


Original issue reported on code.google.com by [email protected] on 7 Oct 2007 at 8:05

Every other line has a different height, looks strange. Possible error when used with Mandigo theme.

What steps will reproduce the problem?
1. Use your syntax hilighter wordpress plugin.
2. Use the Mandigo 1.3 theme.
3. Place code into a page using the same method as described by your usage
page.

What is the expected output? What do you see instead?
If i set my theme to Rin v1.1 then the code displays correctly, much like
the picture on your home page. However with this theme, every odd line
number is thick/tall, and every even line number is thin/short. I have
tried using the control options (i.e. turning of gutter) but i get the same
result. I have included a picture of what it looks like for you.

What version of the product are you using? On what operating system?
I am using version 1.5.1 of the highlighter. My OS is XP, my explorer is
Firefox. My WP version is 2.3.2 and i'm using version 1.3 of the Mandigo theme.

Please provide any additional information below;
I would really like to get this to work, if you have any idea what i can do
that would be great. Or indeed if this is a fix from your side. Your
highlighter looks great and would be really useful to me if i can get it
working. Thanks.


Original issue reported on code.google.com by [email protected] on 11 Jan 2008 at 1:31

Attachments:

Two comments on one line clobber text in between

What steps will reproduce the problem?
1. Syntax highlight the following HTML:
<!-- Comment 1 -->Some Text<!-- Comment 2 -->

What is the expected output?
  The comments should be green, the text should be black.

What do you see instead?
  The whole line is green

What version of the product are you using? On what operating system?
  1.5.0, Cross platform

Please provide any additional information below.

The regex is too greedy.  It looks like you already attempted to solve
this, but missed slightly.  Here's the existing code in shBrushXml.js:
       // Match comments
       // <!--\s*.*\s*?-->
       this.GetMatches(new RegExp('<!--\\s*.*\\s*?-->', 'gm'), 'comments');
Here's the corrected code:
       // Match comments
       // <!--\s*.*?\s*-->
       this.GetMatches(new RegExp('<!--\\s*.*?\\s*-->', 'gm'), 'comments');
Just move the '?' to the previous token.

Original issue reported on code.google.com by [email protected] on 25 Jun 2007 at 1:13

Source code gets line wrapped even when using <pre> tag.

What steps will reproduce the problem?
1. Use SyntaxHighliter to display some JavaScript using the <pre> tag.
2. Resize the browser window to be more narrow than the width of the
displayed code.

What is the expected output? What do you see instead?
Source code shouldn't wrap to next line since it's being displayed within a
<pre> tag. Even if it wasn't in a <pre> tag, the code's original formatting
should be preserved. 

What version of the product are you using? On what operating system?
SyntaxHighlighter 1.5.1 on Windows XP. Problem seems to be OS & browser
independent.

Please provide any additional information below.

The following CSS definition corrects the problem:

div.dp-highlighter ol li { white-space: nowrap; }

Original issue reported on code.google.com by [email protected] on 2 Sep 2007 at 7:48

Not rendering Java 5 code correctly

What steps will reproduce the problem?

1. Use the following code snippet:

<pre name="code" class="java">
package com.centuryminds.softreferences;

import java.util.ArrayList;
import java.util.List;

/**
 * A group of {@link Item}
 */
public class Group<T extends Item>
{
  private final List<T> items = new ArrayList<T>();

  public void add(T item)
  {
    items.add(item);
  }

  // other methods
  // ...
}
</pre>

What is the expected output? What do you see instead?
I would like to see the code rendered as is, but instead, I see:

# package com.centuryminds.softreferences;  
#   
# import java.util.ArrayList;  
# import java.util.List;  
#   
# /** 
#  * A group of {@link Item} 
#  */  
# public class Group<t extends="" item="">  
# {  
#   private final List<t> items = new ArrayList<t>();  
#   
#   public void add(T item)  
#   {  
#     items.add(item);  
#   }  
#   
#   // other methods  
#   // …  
# }  
# </t></t></t> 

My take is that SyntaxHighlighter does not fully support Java 5, or at
least the generics feature introduced in that version.

What version of the product are you using?

1.5.1

On what operating system?

Firefox 2.0+ on MacOS X Tiger


Original issue reported on code.google.com by [email protected] on 9 Nov 2007 at 1:13

Broken when served as Content-Type: application/xhtml+xml

> What steps will reproduce the problem?
1. Serve any of the examples as Content-Type: application/xhtml+xml
  (Methods:
   Using apache, save the file with extension .xhtml
   Or use PHP to send a different content-type.
   )
2. View the page.
3. Profit! ...  I mean bug!

> What is the expected output? What do you see instead?
I expected to see the syntax highlighted code or at least the
non-prettified version.

Instead, I see nothing where the code should be.

> What version of the product are you using? On what operating system?

This is with the SVN revision 56.


Original issue reported on code.google.com by [email protected] on 10 Sep 2007 at 4:00

Suggestions [from wordpress-plugin]

Hi Alex, there few little bugs present in your code.

1. The "name" element in your "pre" tag is not valid markup.
I would replace the "name" value in dp.sh.HighlightAll function 
with "title". That should take care of the problem. It works great in 
Wordpress, no problems with their WYSIWYG/code editor. However, I only 
tested the "pre" tag.

2. I did not have the time to check properly, but in Firefox 2.x, the 
toolbar is displayed randomly, in other words, sometime it shows, other 
time is not. It works fine in IE because it uses the clipboardData. The 
XML brush was added at the end the html page, like in your example.

3. There is no way you can customize the alternate row in CSS, it adds a 
dotted border in Javascript, plus an un-even space beween the alternate 
rows.

For now, I went back to 1.3 version. It works well, except the clipboard. 
You new version is written very well, the code is well aligned, wich is 
rare among developers. :)

I have a suggestion, while here. It would be better to use "code", instead 
of "pre", is more accurate for search engines sine 99% of the time people 
will display code inside.

Thanks for your great work. I gave you credit on my blog:
http://www.yqed.com/code/javascript/syntax-highlighter-installed.html

Original issue reported on code.google.com by [email protected] on 10 Jun 2007 at 8:15

Update to the CSS Brush

I have attached a newer version of the CSS brush that adds a few properties
to the CSS rule list. As well as adds support for the _ hack.

It also fixes an issue with CSS properties that are also values..

Original issue reported on code.google.com by [email protected] on 30 Jul 2007 at 2:29

Attachments:

shCore.js gives errors in sample python code

What steps will reproduce the problem?
1. Open dp.SyntaxHighlighter\Python.html in IE 6.0.3790
2.
3.

What is the expected output? What do you see instead?
Expect: highlight code
Instead: Error in shCore.js.
Line no. 173.
this.regexList[i].regex is null or not an object.
Will debugging, i is 8, this.regexList has 8 elements. i should be between
0-7. Somehow it does not break out of the loop.

What version of the product are you using? On what operating system?
1.5.0

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 22 Jun 2007 at 10:22

[IE BUG] lines are whited out on scroll

When highlighting multiple code snippets on the same page in IE often
individual snippets have blank white space over certain lines.  Doesn't
happen in firefox and only happens intermittently in ie.

Attached is a screenshot example for better explanation.

Look at lines 9 and 10.

Any ideas?

Original issue reported on code.google.com by [email protected] on 15 Oct 2007 at 8:02

Attachments:

Enhancements for Ajax integration and better Safari and IE formatting

1. Enhancements for Ajax
When using any Ajax inline editing tool, like
http://www.appelsiini.net/projects/jeditable, there is a need to reformat
the code listing. In the current version of SH, a second call to
HighglightAll() will duplicate all code listings in the page, so there
should be a way to prevent that. 

Attached is a fix for it. 

2. Better Safari and IE formatting
IE and Safari does not handle long line listings as Firefox does (please
see the attached image for reference). The problem lies on the replace of
blank spaces by &amp;nbsp;, which leaves no room for line breaking. A
solution for this is to left some blank spaces instead of replace all of
them by the respective html entity (this works because *one* space is
always correctly formatted). 

Attached is a fix for it. 

Original issue reported on code.google.com by [email protected] on 27 Aug 2007 at 3:44

Attachments:

Xml tags upper cased in IE6

What steps will reproduce the problem?
1. Create an XML code snippet using the class="xml" with normal xml tags
2. open page in I.E 6
3.

What is the expected output? What do you see instead?
expected: &lt;bean&gt; actual: &lt;BEAN&gt;

What version of the product are you using? On what operating system?
IE6 winXP

Please provide any additional information below.
http://www.jroller.com/mycraziidaz/entry/out_of_memory_early_warning
may be my styles but I checked and couldn't see any such issues.

Original issue reported on code.google.com by [email protected] on 24 Jul 2007 at 1:58

Works for XHTML but not CSS

What steps will reproduce the problem?
http://lystadonline.no/blog/2007/07/05/w3c-validation-buttons-without-using-imag
es/

What is the expected output? What do you see instead?
I think I have done everything correctly, but the CSS doesn't get colored.

What version of the product are you using? On what operating system?
Newest. Downloaded it today.

Original issue reported on code.google.com by [email protected] on 6 Jul 2007 at 9:37

Get font-family working

What is the expected output? What do you see instead?
I expected to see my code in a monospace font, but didn't.

What version of the product are you using? On what operating system?
1.5.1, Firefox

Please provide any additional information below.

To fix, add the following line to the .dp-highlighter ol li,
.dp-highlighter .columns div style in the SyntaxHighlighter.css file:
    font-family: "Consolas", "Courier New", Courier, mono;

Original issue reported on code.google.com by [email protected] on 12 Sep 2007 at 3:25

121212

What steps will reproduce the problem?
1. 1
2. 1
3. 1

What is the expected output? What do you see instead?
1

What version of the product are you using? On what operating system?

1
Please provide any additional information below.

1

Original issue reported on code.google.com by [email protected] on 16 Aug 2007 at 2:46

Attachments:

backslash confusion problem

What steps will reproduce the problem?
1. Use the follow code:
<pre name="code" class="java">
function downfile() {
var Path="d:\\";
var msg1  = new String(); 
var msg2  = new String();
var msg3  = new String();
}
</pre>

What is the expected output? What do you see instead?

The problem is that after the double backslash, msg1, msg2, msg3 lines are
all commented out by Syntax Highlighter.

What version of the product are you using? On what operating system?

1.5.0

Original issue reported on code.google.com by [email protected] on 16 Jun 2007 at 12:57

Extra commas in language regex sets

What steps will reproduce the problem?
1. Open IE6 (used version 6.0)
2. Run custom code
3. See error about "this.regexList[...].regex" not being an object

What version of the product are you using? On what operating system?
Windows XP/IE6

To fix:
Remove extra commas at the end of language brush regex objects. This
(sadly) messes up the JS interpreter in IE6. IE expects another child to
parse, and cannot handle a non-existent next entry. (Sorry if my
terminology is off.)

for example,
Line 18/31 of Scripts/shBrushPython.js:
{ regex: new RegExp(this.GetKeywords(special), 'gm'), css: 'special' },

should be:
{ regex: new RegExp(this.GetKeywords(special), 'gm'), css: 'special' }


thanks!

Original issue reported on code.google.com by [email protected] on 3 Sep 2007 at 10:07

XHTML not supported in IE?

What steps will reproduce the problem?
1. Try to display:
<pre name="code" class="html">
<a class="button" onclick="this.blur();" href="#"><span>Button</span></a>
</pre>

What is the expected output? 
<a class="button" onclick="this.blur();" href="#"><span>Button</span></a>

What do you see instead?
<A class=button onclick=this.blur(); href="#"><SPAN>Button</SPAN></A> 

What version of the product are you using? 
v1.5

On what operating system?
Windows XP, IE 6 & 7

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 25 May 2007 at 6:22

css background-position incorrect display

What steps will reproduce the problem?
1. try to display:
<pre name="code" class="css">
a.button:active {  
  background-position: bottom right;  
}
</pre>


What is the expected output? 
background-position: bottom right;  

What do you see instead?
background-position: bottombottom rightright;

What version of the product are you using? 
v1.5

On what operating system?
Firefox 2.0.0.3, Mac OS 10.4

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 25 May 2007 at 6:01

IE rollover problem

What steps will reproduce the problem?
1. open the highlighted page in IE 7
2. rollover the "view plain" "copy to clipboard" "print" "?" tags
3. the tags will move horizontally

What is the expected output? What do you see instead?
It should not move. It should stay still

What version of the product are you using? On what operating system?
v1.5.1

Please provide any additional information below.
follow the url below to take a look at a live example
http://shiloveschew.com/l/lab/sh/php.html


Original issue reported on code.google.com by shichuanr on 29 Sep 2007 at 6:30

Typo in Styles/SyntaxHighlighter.css

Index: Styles/SyntaxHighlighter.css
===================================================================
--- Styles/SyntaxHighlighter.css        (revision 31)
+++ Styles/SyntaxHighlighter.css        (working copy)
@@ -110,7 +110,7 @@
        font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif;
        color: silver;
        background-color: #f8f8f8;
-       text-align1: right;
+       text-align: right;
        padding-bottom: 10px;
        border-left: 3px solid #6CE26C;
 }

Original issue reported on code.google.com by [email protected] on 27 May 2007 at 6:40

Attachments:

CSS Styles can be overridden by Layout CSS

What steps will reproduce the problem (simply one example of many)?
1. Create a page whose CSS layout sets LI elements to have a
list-style-position to "outside".

What is the expected output? What do you see instead?
Expected: Line numbering from gutter outside the green border.
Unexpected reality: Numbers from gutter become part of the LI content. 
Margin/padding may also be proven incorrect.

What version of the product are you using? On what operating system?
v1.5.0

Please provide any additional information below.
While implementing a plugin for Serendipity (blog script/application), I
chose a new theme (Andreas Viklund's Andreas08) which overrode many of
SyntaxHighlighter's default settings.  Due to cascading and unforeseen CSS
issues, the highlighter box was askew.  I had to make many minor
tests/modifications to get it to work properly across a few tested themes.
 There are still probably quite a few I did not find.

I also fixed up many of the W3C's CSS warning messages on the CSS file in
the process (I did not use any browser based hacks).  The altered CSS file
should be attached.  (Also applied was the other CSS typo issue previously
reported.)

Also, somewhat related, Brian Beck has made modifications to the
sfBrushPython.js and CSS files which look like a nice (albeit overdone)
improvement:
http://blog.case.edu/bmb12/2006/09/making_dpsyntaxhighlighter_for_python_not_suc
k

Original issue reported on code.google.com by BrendonKoz on 28 May 2007 at 7:30

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.