Syntax highlighter doesn't work in blog feeds and mobile version - blogs

I have been using syntax highlighter for my blogs which are hosted on Blogger.com, but recently I noticed that the code which has been highlighted by syntax highlighter doesn't appear on blog's feed and on mobile version. I tried to search over internet but couldn't find any useful information. I am novice to blogger/javascript and couldn't figure out why I am not able to see the formatted code.
Any kind of information will be appreciated here.

After a bit of research I found prettyprint syntax highlighter, which is also being used on Google website e.g developer.android.com.
I liked this its really easy to use and light weight.
Steps to inetgrate is shown in prettify syntax highlighter blogs.

Related

Rouge Syntax Highlighting in GitHub Pages

I have been using Rouge and Kramdown to properly format syntax since I've been using Jekyll. I haven't looked in awhile, but recently noticed that the syntax highlighting doesn't appear to be working properly. I noticed that the change broke when GitHub pages started supporting Jekyll 3.9 (was 3.8.5 for the longest time) and the latest version of Rouge. Anyone else find a solution to this? It appears to be broken on many sites that use GitHub Pages and I cannot find a site where it's working.
Here is a URL that does not work: https://www.jasongaylord.com/blog/embed-javascript-in-custom-aspnet-server-controls
The URL in question that is supposed to show syntax highlighting not working, does in fact appear to have syntax highlighting working correctly.
Section of your site with syntax highlighting, highlighted by Chrome dev tools. Shows syntax highlighting CSS class provided by Rouge and data-lang attribute

ckeditor and codesnippets plugin

I'm baffled! I built ckeditor 4.13 using the online builder, and included the codesnippet plugin. Now when I chose the plugin within the editor from the toolbar it allows me to add the code under which ever language I choose, but the syntax highlighting doesn't work for all languages. For example CSS is not highlighted. The background of the chosen theme is there, but no highlighting. SQL queries are fine as are some others, but not CSS or PHP it would seem!
Also, I'm editing in one place and then viewing the article on another place (pulling the article from a database). The styling is completely missing altogether when it's the article is viewed. I tried to find a CSS file which may contain the classes that had been attached to the snippets (such as language-php) but couldn't. I thought if I just linked to the CSS file in my header it would attach the styling...I was wrong!
Any ideas how I can tackle this issue please? Google has brought nothing so far.
For anyone interested, I've found the best way to deal with the syntax highlighting issue is to download prism. This will work with the classes produced by ckeditors codesnippet plugin and colour code the syntax according the theme you chose from Prism. Look at prismjs.com.

Using syntax highlighter with Tumblr

I'm trying to use Syntax Highlighter with my blog at http://a.shinynew.me. This is a tumblog.
I cannot seem to get it to work. I have followed his basic instructions for installation using the CDN hosted versions, but nothing happens on the page and nothing gets thrown in either firebug or chrome dev tools. All referenced resources are loaded.
I was hoping someone could clue me in to how to use Syntax Highlighter with Tumblr, and if not, what a suitable alternative might be.
I'm going to switch the answer on this to a better answer which is Gist from GitHub. Embeds perfectly with beautiful syntax highlighting and minimal markup.
https://gist.github.com/
Try this.

Answer editor like this site's?

Can anybody point me in the right direction as to how to
implement the editor that opens up when I try to post an answer or type a new question ?
Also when displaying the replies how is the feature with syntax highlighting for the code snippets implemented ?
As far as I know, the Javascript based editor is a heavily modified version of WMD Markdown Editor.
Moving on to your second question. What server side language are you using? For example, in PHP Geshi is a popluar syntax highlighter. Although I personally have not worked with it.
Try the Editor control that comes with AJAX Control Tool kit

Objective C formatting for blogging

I blog on Wordpress, is there any tool to upload the Objective C code in a formatted manner to my blog. I googled to find more on this..but was not of much help.
Check out Wordpress for iOS. The Wordpress app is open source, so you can rummage through the code.
Are you asking about formatting the code in blog posts? If so you can use a syntex highlihging library like syntaxhighlighter.
Edit: There is also a wordpress plugin that will do syntex highligting: http://wordpress.org/extend/plugins/wp-syntax/
There are several syntax highlighter plugins for Wordpress, but not all of them support Objective-C. I just found one that does: The name is "Auto SyntaxHighlighter".
The website of the plugin doesn't mention Objective-C, but the plugin does.
When you write your article in the visual editor in Wordpress, there will be an icon for adding source code. There you can choose the language (e. g. "Objective-C").
In the visual editor, you cannot see all the nice bells and whistles of the added source code, but if you click "preview", you will see the nice syntax highlighting, etc.