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

Fails when package name has a slash (/) #17

Open
defunkydrummer opened this issue Jun 11, 2019 · 1 comment
Open

Fails when package name has a slash (/) #17

defunkydrummer opened this issue Jun 11, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@defunkydrummer
Copy link

The documentation generation fails if the package name has a "/" on it, because this "/" goes straight into the pathname name and thus it's interpreted like a directory separator.

(defun document-package (package-index &key keep-rst (base-path #P"docs/"))
 "Generates documentation in html form for :param:`package-index`.

The documentation file will have the pathanme ``{{base-path}}{{package-name}}.html``, so a package named ``cool-package`` with :param:`base-dir` ``docs/`` will have the generated pathame ``docs/cool-package.html``.

If :param:`keep-rst` is truthy, don't delete the intermediate restructured text file."

 (let* ((pathname (make-pathname :defaults base-path
                                 :name (-> package-index docparser:package-index-name string-downcase)
                                 :type "rst"
                                 :version nil))
        (coo.roles:*context-package* (find-package (docparser:package-index-name package-index)))
        (args (list :variables nil
                    :functions nil
                    :macros nil
                    :generic-functions nil
                    :structures nil
                    :classes nil)))

The problem is at name (-> package-index docparser:package-index-name string-downcase) : pathname is not filtering the package-index's name.

If this package name has a slash (/) (for example "mypackage/utils", then it becomes part of the pathname. It shouldn't.

The system needs to filter the package names accordingly.

@fisxoj fisxoj added the bug Something isn't working label Jul 6, 2019
@fisxoj
Copy link
Owner

fisxoj commented Jul 6, 2019

Thanks for reporting that...

I'll have to think about how to handle it. urlencoding things comes to mind, but I'll try to think about it more, soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants