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

--watch (and preview, server) discard custom separate style sheet after on live updates (style sheet is only considered correctly on first translation) #584

Open
N3bukadne7ar opened this issue Aug 10, 2024 · 2 comments
Labels
bug-triage May be a bug and needs triage need more info

Comments

@N3bukadne7ar
Copy link

Version of Marp Tool

3.4.0

Operating System

Linux

Environment

marp-cli 3.4.0
marpit 3.0.0
npm 10.5.0
ubuntu 20.04

How to reproduce

  1. Unpack attached minimal example
  2. Start marp cli in preview mode with marp --html --preview --theme-set style/ -- presentation.md
  3. --> The slides are initially rendered with the correct custom style (Heading in Red)
  4. Make a change to presentation.md
  5. --> The preview window does not immediately update (!). This is unexpected.
  6. Refresh the preview window with F5
  7. --> The custom style is discarded, heading rendered in black (!). This is unexpected.

Expected behavior

Custom style always loaded correctly

Actual behavior

Custom stylesheet seemingly ignored for any updates in "preview", "watch" and "server" mode.

Additional information

minimal.zip

@N3bukadne7ar N3bukadne7ar added the bug Something isn't working label Aug 10, 2024
@N3bukadne7ar
Copy link
Author

Some additional info:

  • As mentioned, I have also seen this behavior in the --watch and --server modes.
  • There is no issue with style overrides done directly in the mardown file. E.g. I can change styles in the frontmatter or with a html <style> block without problems. This is also the workaround that I am currently using.

@yhatt
Copy link
Member

yhatt commented Aug 16, 2024

I've tested by using your minimal example but the reported behavior was not reproducible at least for my Ubuntu environment. Preview window will be refreshed correctly when changed the Markdown contents. Could you describe more detailed contexts around using Marp?

For example, there is a known issue microsoft/WSL#4739 if you are using Ubuntu through WSL: Changing contents of the file from Windows apps will not notify to Linux apps. (#566 (comment))

@yhatt yhatt added need more info bug-triage May be a bug and needs triage and removed bug Something isn't working labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-triage May be a bug and needs triage need more info
Projects
None yet
Development

No branches or pull requests

2 participants