Coder Social home page Coder Social logo

Comments (10)

HeySora avatar HeySora commented on June 7, 2024 1

Oh, I actually encountered that issue too!

@maximevaillancourt This can be simply reproduced by adding {% include notes_graph.html %} inside a .md file. Adding this in a .html file (like it is the case by default) does not exhibit this issue.

The culprit is _plugins/markdown-highlighter.rb, which mistakenly matches some code from notes_graph.html's JavaScript and attempts to add <mark> tags in the middle of it.

from digital-garden-jekyll-template.

maximevaillancourt avatar maximevaillancourt commented on June 7, 2024 1

You're entirely right: I had to run to an appointment and pushed a lazy "fix". Let me take a deeper look now. Thanks for mentioning it!

from digital-garden-jekyll-template.

bmann avatar bmann commented on June 7, 2024

OK, wait, I know what happened

The markdown highlighter is running on the notes_graph file because it's included in notes doc.content.gsub!(/==+([^ ](.*?)?[^ .=]?)==+/, "<mark>\\1</mark>")

I'm going to add a next line for notes:

Jekyll::Hooks.register [:notes], :post_convert do |doc|
  next if doc.path.start_with?('_includes/')
  replace(doc)
end

This way, we can include the notes graph in arbitrary notes as well.

from digital-garden-jekyll-template.

bmann avatar bmann commented on June 7, 2024

Yeah, I don't really know ruby, that obviously won't work, since this not a note, it's just being included from a note. My hack of not using strict equality seems to work, so.....

from digital-garden-jekyll-template.

boundangel avatar boundangel commented on June 7, 2024

I'm getting the same syntax error. What edit did you make that you found actually worked?

from digital-garden-jekyll-template.

maximevaillancourt avatar maximevaillancourt commented on June 7, 2024

Thank you for the bug report, @bmann. I'm unable to replicate the bug, could you help me by providing the following information?

  1. Where does SyntaxError: Invalid regular expression: missing / show up? Could you provide a screenshot?
  2. Echoing what @boundangel asked, were you able to fix the problem? If so, how?

Thanks!

from digital-garden-jekyll-template.

maximevaillancourt avatar maximevaillancourt commented on June 7, 2024

Thanks everyone for your input! Fixed in #155.

from digital-garden-jekyll-template.

HeySora avatar HeySora commented on June 7, 2024

I wouldn't consider that fixed :( (or at least, the underlying issue)

Simply having such a piece of code in a .md file is enough to break its rendering.

In the .md file:
image

End result:
image

Actual rendered HTML:
image

from digital-garden-jekyll-template.

maximevaillancourt avatar maximevaillancourt commented on June 7, 2024

I think we're in a better place with #156 now ๐Ÿ™‚

from digital-garden-jekyll-template.

HeySora avatar HeySora commented on June 7, 2024

Thank you so much!! Don't feel sorry for having done a lazy fix on a Sunday lool, I quite frankly did not expect anything to be solved today.

Thank you for everything ๐Ÿงก

from digital-garden-jekyll-template.

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.