Highlight custom language on MediaWiki page - syntax-highlighting

My goal is add syntax highlighting for a custom language on my wiki page. In order to do that, I installed Pygments and added my own lexer file (mylexer.py). Since I don't want to pull request the lexer and wait for it to be merged, how do I edit the create_pygmentize_script (linked below) so it uses the locally installed Pygments to create the bundle?
script: https://github.com/wikimedia/mediawiki-extensions-SyntaxHighlight_GeSHi/blob/master/pygments/create_pygmentize_bundle
Pygments Installation Location on local machine: /usr/local/lib/python3.8/dist-packages/pygments
I have been stuck with it for a while now. Any help would be appreciated.

Related

Is there any extension in vscode to generate a stepdefinition file in java from a .feature file?

I want that when i create my .feature file, i want some extension in vscode which generates a step definition file in java. I have seen many such extensions for js but not for java.
I tried downloading many extensions but no one worked for java.
Please. Here you are. This plugin supports it.
Features
Autocomplete of Gherkin steps
Go to step definition
Generate step definition
Syntax highlighting
Formatting (pretty printing)
Language support
C#/SpecFlow
Go/Godog - help needed
Java
JavaScript
PHP
Python/Behave
Ruby
Rust
TypeScript
https://marketplace.visualstudio.com/items?itemName=CucumberOpen.cucumber-official#generate-step-definition
It works. I have checked

How use variables from AsciiDoc in PlantUML diagrams?

I'm using AsciidocFX for creating documentation. Variables created in asciidoc need to be replaced in diagrams. An example which doesn't work:
== My title
:parent-class: Parent
:child-class: Child
[plantuml,"class-inheritence",svg,subs=attributes+]
....
class {parent-class}
class {child-class}
{parent-class} <|-- {child-class}
....
Instead of class diagram, following result is shown. What is wrong?
When I paste your Asciidoc snippet into Eclipse Asciidoctor Editor (v2.4.1) there is absolutely nothing wrong with your code (see next picture).
Just a note: I am the author of the mentioned eclipse plugin.
Looking at your error message, the problem seems to be not at Asciidoctor level but on plantuml: Those error info pictures are generated by plantuml.jar when it comes to errors.
An option is, that AsciidoctorFX (or the installed/used Asciidoctor version) does not replace the place holders (parent-class, child-class) correctly and just give plantuml the plain, unchanged plantuml code - looking at the error message this looks very likely to be the problem.
So I think AsciidoctorFX uses an incompatible or outdated plantuml version or an old Asciidoctor version (or you have installed an old one and AsciidoctorFX is using this).
Maybe you can just update your AsciidoctorFX installation or the used Asciidoctor installation? If this is not helping, you could add an issue at https://github.com/asciidocfx/AsciidocFX/issues so it can be fixed by the maintainers.

Octave Forge packages

I'm running the Window's port of Octave on Windows 10.
I have installed 3 packages; Control, Signal and Communications.
I am wondering if there is a procedure to run to update the Help on disk?
Or should I just use the online help at Octave Forge online documentation
T.I.A.
Just to give a more rounded answer to the question for future readers.
Core Octave documentation comes in two forms:
A manual, which is available in pdf and html form here: http://www.octave.org/doc
This is the same document that is displayed in the octave GUI when you click on the "Documentation" tab.
Help headers. These are defined inside each function, and can be summoned via the help <functionname> command.
For Packages there is no distinct html and "help header" versions. There is only help headers. However, these help headers are also available to read online in slightly nicer-looking html format at the octave forge website, listed under their function reference. If your package installation is up-to-date, then the two should be identical.
You can get some information about the package itself on your terminal (such as a short description and list of functions it provides) by typing pkg describe -verbose <packagename>, and you can see a changelog via news <packagename>. Again, this is the same information that can be found on octave forge, just formatted in nicer html.

Mediawiki <source> tag is not coloring my code section

I have a small wiki using MediaWiki 1.26.2 for personal use, within in one article with this section of text:
<source enclose=div lang=php>
$wgGroupPermissions['*']['createaccount'] = false;
</source>
And it is showing the next result:
Instead of this:
I mean, is formatted but without coloring at all, my understanding is that it should be colorful regardless the skin the wiki is using, so is there a configuration that I'm missing?
Seems there are still the same problems with SyntaxHighlight_GeSHi on MediaWiki 1.32.
Alternative is: Highlightjs
(it uses js for syntax highlihting)
It works out of box, even not necessary changing previously defining code syntax from SyntaxHighlight_GeSHi.
The syntax highlighter extension is bundled with recent MediaWiki installations, but not installed by default. You need to enable it in your LocalSettings.php, like this (for MediaWiki 1.24 and newer):
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
I was able to solved the problem, I'm posting the solution just in case someone else gets the same issue. I have my Wiki hosted in godaddy.com and as part of the service you can install Application out the box, one of them is MediaWiki, which already has the SyntaxHighlight extension installed.
For some reason I don't have clear enough, this extension was not working properly, so I decided to install the extension by my own from here and this time it worked like a charm.

Extending redcarpet for Jekyll?

I've found this post Jekyll, modify the way some html tags are rendered
Which does explain how to extend redcarpet itself.
But what else needs to be done in order to get such extension to work?
What name does the extension correspond to in the _config.yml ?
Do I need to include anything in my gem file?
If I simply change "markdown: redcarpet" to "markdown: RedcarpetMod" github pages will send a main telling me that there were syntax errors in the first markdown file it tries to process.
Your stumbling block here is GitHub pages — the answer given by #cyrusza in the question you've linked works fine (I am using it to modify redcarpet's rendering on one of my sites). GitHub pages, however, runs in safe mode which means that it does not allow custom plugins at all and instead only supports a few specific plugins.
Check the Plugins page in the Jekyll documentation for the note about safe mode (in the first blue box), and the GitHub Pages help page about plugins for the list of which plugins are allowed.

Resources