Code Monkey home page Code Monkey logo

Comments (4)

dwrolvink avatar dwrolvink commented on May 25, 2024 1

Ahh yes, that is done here:

# -- [8] Insert markdown links for bare http(s) links (those without the [name](link) format).
# Cannot start with [, (, nor "
for l in re.findall("(?<![\[\(\"])(http.[^\s]*)", self.page):
new_md_link = f"[{l}]({l})"
safe_link = re.escape(l)
self.page = re.sub(f"(?<![\[\(])({safe_link})", new_md_link, self.page)

This was added because Obsidian does this too (kind of).
It's clear that the regex needs to be more specific.

Will start working on that fix

from obsidian-html.

dwrolvink avatar dwrolvink commented on May 25, 2024 1

Okay that should avoid this issue. Your PR on this issue is also nice to have for if anything else goes wrong in the future.

from obsidian-html.

dwrolvink avatar dwrolvink commented on May 25, 2024

I see the PR. Did you just link to a file that doesn't exist, or is this a kind of workaround?

from obsidian-html.

jcolson avatar jcolson commented on May 25, 2024

I see the PR. Did you just link to a file that doesn't exist, or is this a kind of workaround?

in this case, there is NO file ... the ORIGINAL markdown in Obsidian looked like this:

...
systemctl restart httpd.service
...

the markdown conversion made it look like this:

systemctl restart [httpd.service](httpd.service)

even though, it wasn't really a link, just text.

so I just 'worked around' the error in the html conversion; not sure if this would break other links? but if the file doesn't exist, there really isn't much you can do except change how the md conversion works I think?

from obsidian-html.

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.