EldoranDev / gridsome-plugin-remark-shiki

Syntax highlighter for markdown code blocks using shiki
15 stars 8 forks source link

Inline code snippets not working #1

Closed danvega closed 5 years ago

danvega commented 5 years ago

Is there a way to allow inline code snippets and not create a whole block for it? I have the following text in markdown

In this article, I am going to take a look at the ``<template>`` tag

and it's causing an error and won't display anything past it.

2019-02-13_22-14-36

EldoranDev commented 5 years ago

@cfaddict what would be the expected behaviour for you ? (beside that the code actually shows up). I agree with you that like inline code should not trigger a complete line there.

Did you try it with single ` ?

I'll look into this problem maybe later today or tomorrow.

danvega commented 5 years ago

If know that I have done that in gitbook but I will have to test out if the same happens in VuePress or not. Sorry it was just a single backtick, I was trying to escape it here on Github.

EldoranDev commented 5 years ago

Latest dev branch (available on npm with the @dev tag should fix the issue if you want to take a look at it.

I'll test some more and promote it to @latest if it works.

danvega commented 5 years ago

Thank you!

danvega commented 5 years ago

I updated to @dev ("gridsome-plugin-remark-shiki": "^0.1.1",) and I am still seeing the issue. This is the text in question:

This might be an area that folks have some trouble upgrading because of the security model changes which we will talk about those in a few. By default, all web endpoints are available beneath the path  /actuator  with URLs of the form  /actuator/{id} . The  /actuator  base path can be configured by using the  management.endpoints.web.base-path  property. There is a dedicated detailed document for Spring Boot Actuator Web API Endpoints and this is a great place to start. 

It's showing up now but still triggering a new line.

2019-02-17_11-22-43

EldoranDev commented 5 years ago

Are the inline blocks rendering as code tags ? Do you have some specific styles for code or .shiki ?

I could change the inline blocks to render as <code class="shiki-inline"> instead of <code class="shiki">

danvega commented 5 years ago

Yes I think that would work. I went in and added that around the the template tag and it worked..

<code class="shiki-inline">&lt;template&gt;</code>

2019-02-20_20-16-53

cossssmin commented 5 years ago

The plugin is still 0.1.0 on NPM, so inline code is still being wrapped with <pre> instead of <code>, which makes it impossible to style differently. Can you please update that? Thanks for creating this 👍

EldoranDev commented 5 years ago

Oh my bad, missed the failing travis deploy for 0.1.3

just published it as 0.2.0.

cossssmin commented 5 years ago

Thank you! 😊