GithubHelp home page GithubHelp logo

Comments (10)

trusktr avatar trusktr commented on May 23, 2024 2

@kbmts There's something in the code (not CSS style) that is generating the character.

Here is the source markdown file:

https://kbmts.github.io/docsify-test/README.md

# Docsify Test

## content1

ps -ef | grep 'web'

## content2

du -h --max-depth

A simple solution to this @kbmts is to wrap the code with backticks symbols (`). Change the markdown content to the following:

# Docsify Test

## content1

`ps -ef | grep 'web'`

## content2

`du -h --max-depth`

Here is a sample output:

Docsify Test

content1

ps -ef | grep 'web'

content2

du -h --max-depth

If you do this, then the normal text will have nicer looking quotes, but the inline code will not be transformed.

Also curious, if you remove docsify-themeable.min.js, does it stop transforming the quotes?

from docsify.

kbmts avatar kbmts commented on May 23, 2024 1

@trusktr @Koooooo-7 Thank you very much. It's the docsify-themeable js issue!

from docsify.

jhildenbiddle avatar jhildenbiddle commented on May 23, 2024 1

@kbmts @trusktr --

Bug confirmed and fixed.

From this comment:

It turns out the docsify-themeable JS was setting the markdown processor's smartypants option to true. Enabling this option "turns plain ASCII punctuation characters into "smart" typographic punctuation HTML entities" according to the SmartyPants project description. Mystery solved.

I've made the necessary change on the dev branch. I will publish an updated version when the next version of Docsify is released. That will hopefully happen in the next few weeks. In the meantime, you have two options:

  1. Wrap affected text in backticks (e,.g. ps -ef | grep 'web') as @trusktr recommended here.
  2. Download and locally host the current preview build of docsify-themeable.min.js which contains the fix.

Thanks!

from docsify.

trusktr avatar trusktr commented on May 23, 2024 1

Nice!

from docsify.

Koooooo-7 avatar Koooooo-7 commented on May 23, 2024

Hi @kbmts , could you provide an reproduce?
It sounds weird and I can not reproduce it either.

from docsify.

trusktr avatar trusktr commented on May 23, 2024

Markdown does what it does, not sure how to avoid. Do you add plugins? Can't see your issue directly. Can you link to an example?

If you want to show pieces of code, use back ticks. For example,

Provide some `--option` to enable some feature. Internal code receives the string `'foo'`.

The output looks like this:

Provide some --option to enable some feature. Internal code receives the string 'foo'.

from docsify.

kbmts avatar kbmts commented on May 23, 2024

test page
@Koooooo-7 @trusktr

from docsify.

Koooooo-7 avatar Koooooo-7 commented on May 23, 2024

Hi, it seems the docsify-themeable plugin styling issue.

<script src="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/js/docsify-themeable.min.js"></script>

from docsify.

trusktr avatar trusktr commented on May 23, 2024

@jhildenbiddle does docsify-themeable.js change the quotes? If so, does it have a config option?

re-opening to track the quote issue (but feel free to unsubscribeif needed @kbmts).

from docsify.

jhildenbiddle avatar jhildenbiddle commented on May 23, 2024

@trusktr --

I don't believe it does, but I will verify and report back.

from docsify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.