AnswerDotAI / AnswerDotAI/nbdev
Function def input parameter comments causing a "Javascript error"
- Dominant language
- Jupyter Notebook
- Stars
- 5.3k
- Forks
- 513
- Avg merge
- 2d 30m
- Merged PRs (30d)
- 8
Description
With the following in a code cell:
```
#| export
def XCORS_trim_to_time(
f:str,
start:str,
stop:str):
pass
```
and this in a following cell:
```
show_doc(XCORS_trim_to_time)
```
I get the correct expected output:

But when inserting parameter comments as described in the
Nbdev video:
```
#| export
def XCORS_trim_to_time(
f:str, # Filename
start:str, # Start time.
stop:str): # Stop time.
pass
```
```
show_doc(XCORS_trim_to_time)
```
Below is a screencap of the resulting fail:

Contributor guide
Research direction
Reproduce the issue in a notebook using the exported XCORS_trim_to_time definition with inline parameter comments, then run show_doc(XCORS_trim_to_time) in the following cell. Compare the output with the version without comments; done means parameter comments no longer cause a JavaScript error and the documentation renders correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100