marp-cli icon indicating copy to clipboard operation
marp-cli copied to clipboard

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

Open simchri opened this issue 1 year ago • 2 comments

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

simchri avatar Aug 10 '24 11:08 simchri

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

simchri avatar Aug 10 '24 11:08 simchri

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 https://github.com/microsoft/WSL/issues/4739 if you are using Ubuntu through WSL: Changing contents of the file from Windows apps will not notify to Linux apps. (https://github.com/marp-team/marp-cli/issues/566#issuecomment-1895089694)

yhatt avatar Aug 16 '24 04:08 yhatt

This issue is being closed to clean up the issue tracker, because it has become outdated and no additional information is provided. If you are still having trouble, please re-open this with further details.

yhatt avatar Nov 30 '24 10:11 yhatt