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

Relative paths in HTML elements are not converted to unified absolute URLs #2251

Open
garylavayou opened this issue Oct 4, 2023 · 0 comments

Comments

@garylavayou
Copy link

Bug Report

Relative path in embedded HTML elements, e.g., images are not converted to unified absolute URLs that can be accessed from the document page.

Steps to reproduce

An image in markdown file inserted as HTML img element:

<img src=".assets/cake.png" alt="img" style="zoom: 60%;">

The container markdown files path is JavaScript/JavaScript.md in the docs folder (The corresponding access URL is http://localhost:3000/#/JavaScript/JavaScript).

Current behaviour

The serving HTML file contains the raw img element:

<img src=".assets/cake.png" alt="img" style="zoom: 60%;">

Expected behaviour

The serving HTML file should contain a processed img element, where the URL is relative to the contained document file:

<img src="/JavaScript/.assets/cake.png" alt="img" style="zoom: 60%;">

Other relevant information

  • Docsify version: "4.13.1"

Please create a reproducible sandbox

Edit naughty-curie-c8kh47

Mention the docsify version in which this bug was not present (if any)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant