asciidoctor / asciidoctor-diagram

:left_right_arrow: Asciidoctor diagram extension, with support for AsciiToSVG, BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, Erd, GraphViz, Mermaid, Msc, PlantUML, Shaape, SvgBob, Syntrax, UMLet, Vega, Vega-Lite and WaveDrom.
http://asciidoctor.org
MIT License
431 stars 106 forks source link

wavedrom-cli.CMD ignored in searching for wavedrom-cli on Windows 11 #459

Closed metro69 closed 3 weeks ago

metro69 commented 3 months ago

In lib/asciidoctor-diagram/wavedrom/converter.rb, the code checks whether the found wavedrom ends in '-cli'.

On windows 11, source.find_command finds "wavedrom-cli.CMD". This is ignored in the check in line 38:

        if wavedrom.end_with?('-cli')

This results the code failing to convert. By changing the check to the code below, the conversion successfully completes.

        if wavedrom.end_with?('-cli') || wavedrom.end_with?('-cli.CMD')

wavedrom version: 3.2.0 asciidoctor-diagram version: 2.3.0

MT