Published | Actual | |
Birmingham New Street | 06:50 | 06:50 |
London Euston | 08:15 | 08:15 |
I have posted in the past about jEdit and Markdown and how I use jEdit to write my Markdown and preview using the Markdown plug-in. There is an annoying bug in the Markdown plug-in from the jEdit plug-in manager (v0.1), that also exists in the latest version on the authors website (0.1.1), which affects nested lists so that when they are generated they only display the first word of the top level list items, this can be replicated and seen as follows:
Firstly create an .md
file in jEdit with this content:
1. This is list item 1
1. This is list item 1.1
1. This is list item 1.2
1. This is list item 2
1. This is list item 3
1. This is list item 3.1
1. This is list item 3.1.1
1. This is list item 4
Next, use the Markdown plug-in in jEdit to preview the text, the following will be shown:
You can see that item 1, 3 and 3.1 only display a single word for their list item.
The original author of the plug-in hosts it in an Atlassian Bitbucket and I could see from the commit history that the dependencies have been updated recently however there was no binary version of the latest project. Using Mercurial I downloaded the project into Eclipse but encountered some issues, these were most likely because my environment isn’t set up correctly for the build but I didn’t have time/inclination to investigate further. As the plug-in is distributed under the GNU GPL I decided to upgrade the plug-in libraries myself by doing the following:
- Close jEdit
- Download pegdown-1.4.2.jar, this relies on parboiled
- Download parboiled-java-1.1.6.jar which relies on parboiled-core-1.1.6.jar and asm-all-4.0.jar
- Using 7-Zip open the MarkdownPlugin.jar file and edit the MarkdownPlugin.props file within the plug-in so that the following properties change.
plugin.ua.pico.jedit.markdown.MarkdownPlugin.jars=parboiled4j-0.9.9.0.jar pegdown-0.8.5.4.jar
Becomesplugin.ua.pico.jedit.markdown.MarkdownPlugin.jars=asm-all-4.0.jar parboiled-java-1.1.6.jar parboiled-core-1.1.6.jar pegdown-1.4.2.jar
- Copy the modified MarkdownPlugin.jar, parboiled-java-1.1.6.jar, parboiled-core-1.1.6.jar, pegdown-1.4.2.jar and asm-all-4.0.jar to the jars directory of the jEdit install,
- Start jEdit.
Now when I preview or render a Markdown file I get the lists correctly returned to me:
One of the downsides to this approach is that new features in pegdown that may be supported in the Bitbucket project will not be available.