Skip to content
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

Breaking change on v4.8.* #681

Closed
dialex opened this issue Nov 2, 2018 · 17 comments
Closed

Breaking change on v4.8.* #681

dialex opened this issue Nov 2, 2018 · 17 comments
Labels

Comments

@dialex
Copy link

dialex commented Nov 2, 2018

This is my live website. Now it's fine because I've fixed docsify's version on 4.7.1. However, if I change to 4.8.* several issues occur:

  • The background custom color is ignored
  • The style of the button disappears
  • The sidebar links break

I've already compared my index.html with the latest template and it looks fine. I have no idea what causes that. Examples below.

4.7.1 (ok):
screenshot 2018-11-02 at 17 20 19

4.8.0 (not ok):
screenshot 2018-11-02 at 17 20 08

4.8.0 (broken sidebar):
screenshot 2018-11-02 at 17 35 56

Thoughts?

@cheng-kang
Copy link
Contributor

Please update to 4.8.3 and see if the issues stay.

@dialex
Copy link
Author

dialex commented Nov 3, 2018

Yup, same broken behaviour 😢
Here's my index.html

@cheng-kang
Copy link
Contributor

According to https://marked.js.org/#/README.md#specifications`marked` is following CommonMark. Space in link is not supported as per the specs.

Alternatively, for now, you could use <img data-origin="linear-gradient(to left bottom, #F0FD37 0%, #ACF260 100%)" alt="color">; so that you can still use latest version and have all other fixes applied to your site.

@QingWei-Li I guess we need to make a decision on whether or not to add support for space in link in Docsify.

@QingWei-Li
Copy link
Member

@cheng-kang I think we should follow the rules.
But to be compatible with using space characters in custom background color.

@dialex About the sidebar, You should split the line between the html tag and the markdown content. I don't think this is a bug in docsify, it will also render errors on github.

image

@dialex
Copy link
Author

dialex commented Nov 9, 2018

@cheng-kang I followed your tip and replaced ![color](linear-gradient(to left bottom, #F0FD37 0%, #ACF260 100%)) with <img data-origin="linear-gradient(to left bottom, #F0FD37 0%, #ACF260 100%)" alt="color"> but it didn't solve the issue. 😢

image

As for the sidebar, you were right, it just needed a newline between the html code and the markdown. Amazing, thanks a lot! 👍

@cheng-kang
Copy link
Contributor

@dialex sorry, this should do the trick: <p><img data-origin="linear-gradient(to left bottom, #F0FD37 0%, #ACF260 100%)" alt="color"></p>.

Will resolve the issue ASAP.

@extrapixel
Copy link

For this reason I openend #665 and #666 which both are not fixed (but closed).

@cheng-kang
Copy link
Contributor

@extrapixel I think both are closed because they are fixed. Have you tried latest version?

Regarding background colour, the case here is different.

@extrapixel
Copy link

@cheng-kang yes, using the latest version. And no, for me it's exactly as described here by @dialex . Buttons not rendering, (custom) background-colon not showing.

@dialex
Copy link
Author

dialex commented Dec 24, 2018

@extrapixel if you use the latest Docsify (v4.8.4) and change the background colour declaration to something like: <p><img data-origin="linear-gradient(to left bottom, #F0FD37 0%, #ACF260 100%)" alt="color"></p> (like @cheng-kang suggested)...

  • The correct background colour is displayed ✅
  • And magically the button style gets also fixed ✅

Give it a try! I'll close this issue because it's fixed for me.
Thanks @cheng-kang !

dialex added a commit to dialex/start-testing that referenced this issue Dec 24, 2018
@dialex dialex closed this as completed Dec 24, 2018
@extrapixel
Copy link

Give it a try! I'll close this issue because it's fixed for me.

It's not fixed. If you want to fix it, at least update the documentation: https://docsify.js.org/#/cover?id=custom-background

@dialex
Copy link
Author

dialex commented Dec 24, 2018

I'm still not sure if @cheng-kang code snippet is the new way of setting a bkg colour or just a workaround. Anyway you're right, I could do a PR, here it is #724

@cheng-kang
Copy link
Contributor

@extrapixel have you tried the latest version? I remember there was a fix released, and just checked v4.8.6, it's working as expected.

@extrapixel
Copy link

have you tried the latest version?

Of course, I'm on the head of unpkg.

it's working as expected.

What is expected? I expect to be able to set a custom background colour. I expect do be able to disable to ugly random colours. I expect it to be documented in the docs. I don't see any of it.

@cheng-kang
Copy link
Contributor

@extrapixel chill...

Because I just tested again, created a new project with docsify-cli, using latest source code from unpkg. And this works:

![color](red)

Do you have a link for me to check?

@dialex
Copy link
Author

dialex commented Sep 20, 2019

@timaschew ,
as of the latest version (4.9.4) what is the proper way to set background colour use a gradient?

It used to be like this

![color](linear-gradient(to left bottom, #F0FD37 0%, #ACF260 100%))

But then 4.8.0 broke it. As a workaround we could (and still can on 4.9.4) use:

<p><img data-origin="linear-gradient(to left bottom, #F0FD37 0%, #ACF260 100%)" alt="color"></p>

Do we still need to use that workaround? Or is there a markdown way to do it? I don't see that feature listed in the official doc anymore.

@dialex dialex reopened this Sep 20, 2019
@stale
Copy link

stale bot commented Feb 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 4, 2020
@stale stale bot closed this as completed Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants