SpeciesFileGroup / taxonworks

Workbench for biodiversity informatics.
http://taxonworks.org
MIT License
87 stars 27 forks source link

[Bug]: Missing content formatting in TaxonPages #3980

Closed okeller1977 closed 5 months ago

okeller1977 commented 5 months ago

Steps to reproduce the bug

1. Add a formatted list in the content option for a taxon name
2. On TaxonPages it shows up unformatted at least for lists. Bold and italics show up
3. 
...

Screenshot

TaxonWorks

image

TaxonPages

image

Expected behavior

Just the same formatting as I chose for the content

Additional Screenshots

No response

Environment

Production

Sandbox Used

No response

Version

v0.42.0

Browser Used

Chrome

jlpereira commented 5 months ago

@okeller1977 link to this example?

okeller1977 commented 5 months ago

https://lampyridae.world/#/otus/1025488/overview

jlpereira commented 5 months ago

@mjy it seems redcarpet converts markdown format in a different way that marked does

@okeller1977 you can fix this putting a space between lists:

image
okeller1977 commented 5 months ago

@jlpereira I tried it with spaces between lists but it didn't make a difference on TaxonPages

mjy commented 5 months ago

@jlpereira Do you want to get raw from API and convert client-side?

jlpereira commented 5 months ago

Not really, I'd like to reduce the client code as much as possible. Doing the change I mention before it should works, but I have to push a list style too for this component. Pushing it in a bit

mjy commented 5 months ago

We could also explore other Markdown converts in Ruby, I haven't looked at such for a very long time.

jlpereira commented 5 months ago

We could also explore other Markdown converts in Ruby, I haven't looked at such for a very long time.

https://github.com/gettalong/kramdown https://github.com/gjtorikian/commonmarker

Are alternatives, but we will have to check if they are good. Btw we are using redcarpet 3.4, latest version is 3.6. But the new one doesn't seems to fix this.

@okeller1977 first, update main branh in your taxonpages repository. Then, use Content publisher task in TaxonWorks to publish again this content. If you are publishing everything, just press Publish all. Let me know if this change works for you

okeller1977 commented 5 months ago

@jlpereira Sorry I was on a flight.

I updated the main branch and republished everything. Still looks the same: https://lampyridae.world/#/otus/1025488/overview

jlpereira commented 5 months ago

I can't see your site, @okeller1977

It looks CNAME file is missing in gh-pages. After updating your main branch, github workflow was executed following the actions there, you have to add a CNAME file with your domain in gh-pages branch, or just trigger the action in setup branch to create it by GitHub Actions

okeller1977 commented 5 months ago

@jlpereira The page works for me and friends: https://lampyridae.world/#/otus/1025488/overview

I've done the CNAME file last week.

jlpereira commented 5 months ago

Yes, but it was deleted after you update main branch. It seems setup branch has updated and now CNAME is there again.

image

Panel content looks good to me

jlpereira commented 5 months ago

@okeller1977 if you don't see the changes, maybe is because your browser cache. Try to refresh the page by:

Windows/Linux: Ctrl + F5 Mac: Command + R

okeller1977 commented 5 months ago

Oh yes now it works for me as well. Thank you so much for your help @jlpereira

jlpereira commented 5 months ago

Glad to help, @okeller1977