Just noticed that codebox seems to be parsing things into special characters.
I just entered "open_parenthesis + lowercase_c + close_parenthesis" and it becomes this © regardless of if it is in a code box or not.
Also it seems impossible to paste code from a code box in another post into a new thread without getting unwanted formatting.
For instance if I take this from another post and try to copy it:
def foo(bar):
print("Hello")
I get two code boxes each with one line. Removing formatting doesn't help as then I have a bunch of unwanted code tags to remove.
Quote:I get two code boxes each with one line. Removing formatting doesn't help as then I have a bunch of unwanted code tags to remove.
I assume you are referring to this?
I get this all the time. Surprisingly not this time with your code here....but most of the time. The only options are to put it into the quick reply, instead of the advanced reply, or put it in a text editor to copy from :huh: . For some reason it doesnt do that in quick reply. I still have no idea whatsoever why this does that...nor how to fix it.
Ill check on the copyright symbol. Ive had this problem before where the default smilies code interferes with code and inputs an image in the code...then the syntax highlighter does not know how to handle it, and inserts an img html tag in its place of that.
Quote:I assume you are referring to this?
Yes, exactly that. Very annoying.
Quote:Ive had this problem before where the default smilies code interferes with code and inputs an image in the code
Yeah, I tried turning smilies off to see if it helped but no luck.
Thats why i was suggesting to bring back the original default code box. Though it has no sntax highlighter...it doesnt have problems like this.
actually i know exactly what is causing it...dont know the fix though
Quote:<td class="code">
<div class="container"><div class="line number1 index0 alt2"><code class="python keyword">def</code> <code class="python plain">foo(bar):</code></div><div class="line number2 index1 alt1"><code class="python spaces"> </code><code class="python functions">print</code><code class="python plain">(</code><code class="python string">"Hello"</code><code class="python plain">)</code></div></div>
</td>
its for some reason copying the html code tags along with the text
It's because of our habits. Instead using CTRL+SHIFT+V to paste as plain text, we use CTRL+V, which causes the problem.
the copyright problem is gone. There were some others that i removed as well
Quote: //$standard_mycode['copy']['regex'] = "#\(c\)#i";
//$standard_mycode['copy']['replacement'] = "©";
//$standard_mycode['tm']['regex'] = "#\(tm\)#i";
//$standard_mycode['tm']['replacement'] = "™";
//$standard_mycode['reg']['regex'] = "#\(r\)#i";
//$standard_mycode['reg']['replacement'] = "®";
©
®
Quote: Instead using CTRL+SHIFT+V to paste as plain text
This doesnt seem to anything for me at all in chrome. Also I wouldnt want to reply on a keyboard shortcut as most new users copy or paste with their mouse.
Hmm! I am running Iron right now and this is the shortcut for "paste as plain text". Since it is based on Chromium like Google Chrome it should have similar functionality. I know this is not a rule but...
Quote:Also it seems impossible to paste code from a code box in another post into a new thread without getting unwanted formatting.
No,there a solution that solve it all,this from copy from other codebox or copy code from web.
First i have not had any problem copy from new syntaxHighlighter codebox to other thread.
You know that you can double-click on code to selcet all,then copy and add new code box.
This is my copy from other code box in post,no clean up.
def foo(bar):
print("Hello")
Just copy from old
forum and paste.
[color=#2e8b57][size=x-small][font=Monaco,]class File:[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,] def __init__(self, name):[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,] self.name = name[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,]class Folder(File):[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,] def __init__(self, name):[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,] super().__init__(name)[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,] self.children = [][/font][/size][/color]
Now with the magic button push in
view source(ctrl+shif+s)
This is the exact same paste with 1 difference this example is
view source(ctrl+shif+s) push in.
class File:
def __init__(self, name):
self.name = name
class Folder(File):
def __init__(self, name):
super().__init__(name)
self.children = []
There also a
Remove formatting button this work when
not view source(ctrl+shif+s) is push in.
It would have removed all formatting so it look like second example.
I gone write some more about this stuff,because this can be hard to figure out :s!
(Oct-12-2016, 09:10 PM)snippsat Wrote: [ -> ]Quote:Also it seems impossible to paste code from a code box in another post into a new thread without getting unwanted formatting.
No,there a solution that solve it all,this from copy from other codebox or copy code from web.
First i have not had any problem copy from new syntaxHighlighter codebox to other thread.
You know that you can double-click on code to selcet all,then copy and add new code box.
This is my copy from other code box in post,no clean up.
def foo(bar):
print("Hello")
Just copy from old forum and paste.
[color=#2e8b57][size=x-small][font=Monaco,]class File:[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,] def __init__(self, name):[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,] self.name = name[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,]class Folder(File):[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,] def __init__(self, name):[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,] super().__init__(name)[/font][/size][/color]
[color=#2e8b57][size=x-small][font=Monaco,] self.children = [][/font][/size][/color]
Now with the magic button push in view source(ctrl+shif+s)
This is the exact same paste with 1 difference this example is view source(ctrl+shif+s) push in.
class File:
def __init__(self, name):
self.name = name
class Folder(File):
def __init__(self, name):
super().__init__(name)
self.children = []
There also a Remove formatting button this work when not view source(ctrl+shif+s) is push in.
It would have removed all formatting so it look like second example.
I gone write some more about this stuff,because this can be hard to figure out :s!
This is what i get......when i do that
class
File
:
def
__init__(
self
, name):
self
.name
=
name
class
Folder(
File
):
def
__init__(
self
, name):
super
().__init__(name)
self
.children
=
[]
The remove formatting removes text styles...but does not remove code tags. Copying copies the code tags as well.