Plugin: Code highlighting
-
Per the suggestion, I would like to request that wordpress.com adds a code highlighting plugin.
I’ve been struggling to get XML and PowerShell code to display on my blog, and a code plugin would sort this out for me and everyone else.
For example: https://wordpress.org/plugins/wp-code-highlight/The blog I need help with is: (visible only to logged in users)
-
-
I was not aware of that, thank you!
Although it seems to be getting confused at line 27 of the second code block here https://rcmtech.wordpress.com/2015/08/06/powershell-regex-web-scraping/
I’m guessing it’s the unusual character combo in the regex… -
Please type modlook into the sidebar tags on this thread for Staff help. How do I get a Moderator/Staff reply for my question? https://en.support.wordpress.com/getting-help-in-the-forums/#how-do-i-get-a-moderatorstaff-reply-for-my-question Then please subscribe to this thread so you are notified when they respond. To subscribe look in the sidebar of this thread, find the subscribe to topics link and click it.
-
-
Also, the editor is converting all the “<” and “>” symbols in the XML code on that page into HTML (i.e. > and <) every time the page is loaded in the editor, which messes it up somewhat.
Is it actually broken or am I doing something wrong?
-
ha, so a) the forum has converted my HTML symbols into the actual symbols, and b) I got them the opposite way around, doh!
Anyway, I suspect you know what I mean:
ampersand lt semi-colon
ampersand gt semi-colon -
Hi there,
Although it seems to be getting confused at line 27 of the second code block here https://rcmtech.wordpress.com/2015/08/06/powershell-regex-web-scraping/
I’m guessing it’s the unusual character combo in the regex…Sorry for the trouble with that source code shortcode. I see you have two quotation marks in line 26, and that’s causing the issue. That shortcode is based on Alex Gorbatchev’s SyntaxHighlighter project, and unfortunately that quotation mark issue is a bug in that project. You can find the open source project for that here:
https://github.com/syntaxhighlighter/syntaxhighlighter
If that bug is fixed in the project there, that fix will also land here at WordPress.com.
Also, the editor is converting all the “<” and “>” symbols in the XML code on that page into HTML (i.e. > and <) every time the page is loaded in the editor, which messes it up somewhat.
That’s an issue related to how the editor at encodes the characters — our team has an open report for that bug, but I don’t have a timeline for when they’ll be able to look into that issue.
For now, you can avoid that issue by editing posts with that shortcode in your site’s WP Admin dashboard:
http://rcmtech.wordpress.com/wp-admin/
You can head to the Posts section there and click on any post title to edit it in the WP Admin editor. If you run into the same issue in that editor, please let me know!
-
Hi there,
Also, the editor is converting all the “<” and “>” symbols in the XML code on that page into HTML (i.e. > and <) every time the page is loaded in the editor, which messes it up somewhat.
Our team launched a fix for this issue, so the symbols in your code won’t be converted into HTML entities when you edit it now. If you have any further trouble with that issue, please let me know!
-
- The topic ‘Plugin: Code highlighting’ is closed to new replies.