Skip to content

Fix #78: Handle spaces and quotes in author argument#111

Open
mariam851 wants to merge 1 commit intorasbt:masterfrom
mariam851:feat-complete-enhancements-87-78
Open

Fix #78: Handle spaces and quotes in author argument#111
mariam851 wants to merge 1 commit intorasbt:masterfrom
mariam851:feat-complete-enhancements-87-78

Conversation

@mariam851
Copy link
Contributor

Description:
Hi @rasbt,

This PR addresses the UsageError reported in issue #78, where the %watermark magic command fails when an author's name contains spaces (e.g., -a 'Sebastian Raschka').

Changes:

In magic.py: Updated the --author (and -a) argument definition to use nargs='+'. This allows the parser to capture multi-word strings as a list.

Argument Handling: Added logic to .join() the name parts back into a single string before passing it to the core function.

Robustness: Ensured that any surrounding single or double quotes are correctly stripped to prevent formatting issues in the final output.

Screenshot (17)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant