sphinx-contrib / matlabdomain

A Sphinx extension for documenting Matlab code
http://sphinxcontrib-matlabdomain.readthedocs.io/
Other
70 stars 45 forks source link

Parsing fails under certain circumstances when using fprintf("...") #117

Closed Funky185540 closed 3 years ago

Funky185540 commented 3 years ago

First of all:

Thank you very much for the effort you're putting into this project, for maintaining it in the first place and especially for fixing #116 so quickly!

While continuing to document my sources today I found another curious issue. See below.

Steps to reproduce

  1. Get a copy of this github repo
  2. In docs/src/ add a file called test.m with this content:

    classdef test
        %TEST Summary of this class goes here
        %
        %   Detailed explanation goes here
    
        properties
            Property1
        end
    
        methods
            function obj = test(inputArg1,inputArg2)
                %TEST Construct an instance of this class
                %
                %   Detailed explanation goes here
                fprintf("...");
                return;
            end
        end
    end
  3. Compile the docs: make html

Expected output

The docs are generated without warnings

Actual output

A warning is generated when compiling:

WARNING: [sphinxcontrib-matlabdomain] Parsing failed in src.test. Check if valid MATLAB code.

Additional observations

joeced commented 3 years ago

Thanks again for the very detailed error report. It makes it super easy to find and fix bug!