New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforcing Kramdown and Rouge breaks PHP syntax highlighting #205

Closed
alyssais opened this Issue Feb 10, 2016 · 8 comments

Comments

Projects
None yet
6 participants
@alyssais

Pygments supports a special PHP syntax highlighting option called startinline. It instructs the highlighter to begin interpreting code as PHP immediately, rather than waiting for an opening <?php tag.

It's used like this:

{% highlight php startinline %}
echo "Hello, world!";
{% end %}

Rouge also supports this, but the syntax is a little different:

```php?start_inline=1
echo "Hello, world!";
```

So far, so good — as long as your markdown parser is Redcarpet.

Kramdown's parser messes up, and will interpret the above code as a fenced code block with no language specified, the first line of which is php?start_inline=1.

This means that, unless something changes, after 1 May startinline syntax highlighting will disappear from GitHub Pages.

The only way to solve this without removing the Kramdown-enforcement, as I can see it, is

  1. Get Kramdown's parser fixed (gettalong/kramdown#234)
  2. Get a new version of Kramdown released
  3. Get a new version of Jekyll released with the Kramdown dependency. (Bear in mind the last down Jekyll updated the version of Kramdown it depended on was in 2014 — there have been six 1.x released since then.)
  4. Upgrade GitHub Pages to the new version of Jekyll

This seems unlikely to all be accomplished by May 1.

So, the only way to avoid a regression in GitHub Pages is likely to be postponing the date Kramdown enforcement begins.

@benbalter

This comment has been minimized.

Show comment
Hide comment
@benbalter

benbalter Feb 10, 2016

Contributor

. (Bear in mind the last down Jekyll updated the version of Kramdown it depended on was in 2014 — there have been six 1.x released since then.)

GitHub Pages (and thus Jekyll) is using Kramdown 1.9.0. Is that not the latest release?

Upgrade GitHub Pages to the new version of Jekyll

Which version are you referring to? (We're currently running 3.0.3). Do you have a link to an issue where this bug was fixed?

Contributor

benbalter commented Feb 10, 2016

. (Bear in mind the last down Jekyll updated the version of Kramdown it depended on was in 2014 — there have been six 1.x released since then.)

GitHub Pages (and thus Jekyll) is using Kramdown 1.9.0. Is that not the latest release?

Upgrade GitHub Pages to the new version of Jekyll

Which version are you referring to? (We're currently running 3.0.3). Do you have a link to an issue where this bug was fixed?

@alyssais

This comment has been minimized.

Show comment
Hide comment
@alyssais

alyssais Feb 10, 2016

Okay, sorry about that, I misread Jekyll's gemspec.

In that case, all that needs to happen is for Kramdown to fix the issue, release a new version and for GitHub Pages to update to the new version of Kramdown.

That seems far more doable, although the Kramdown issue was opened almost a year ago and it doesn't look like much has happened since then…

Okay, sorry about that, I misread Jekyll's gemspec.

In that case, all that needs to happen is for Kramdown to fix the issue, release a new version and for GitHub Pages to update to the new version of Kramdown.

That seems far more doable, although the Kramdown issue was opened almost a year ago and it doesn't look like much has happened since then…

@svivian

This comment has been minimized.

Show comment
Hide comment

svivian commented Feb 19, 2016

+1

@gettalong

This comment has been minimized.

Show comment
Hide comment
@gettalong

gettalong Feb 19, 2016

This is now fixed in kramdown.

This is now fixed in kramdown.

@parkr parkr added the bug label Feb 19, 2016

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Feb 19, 2016

Contributor

kramdown commit: gettalong/kramdown@0f4d1ff & issue: gettalong/kramdown#234

@gettalong Let us know what your plans are for a new release and we can coordinate on bumping it.

Contributor

parkr commented Feb 19, 2016

kramdown commit: gettalong/kramdown@0f4d1ff & issue: gettalong/kramdown#234

@gettalong Let us know what your plans are for a new release and we can coordinate on bumping it.

@gettalong

This comment has been minimized.

Show comment
Hide comment
@gettalong

gettalong Feb 19, 2016

@parkr I will probably release a new version at the end of next week.

@parkr I will probably release a new version at the end of next week.

@mmoll

This comment has been minimized.

Show comment
Hide comment

mmoll commented Mar 5, 2016

@alyssais

This comment has been minimized.

Show comment
Hide comment
@alyssais

alyssais Mar 10, 2016

This appears to have been fixed in #230. 👍

This appears to have been fixed in #230. 👍

@alyssais alyssais closed this Mar 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment