Skip to content

Header id generation in the notebook needs to be majorly reworked. #1899

@mpacer

Description

@mpacer

Both in terms of generating invalid ids for headers, as well as in not adhering to the conventions already present in other header id mechanisms (e.g., pandoc), and in not using user generated ids, our current solution for generating ids is problematic.

If you want a quick overview of some of these issues see:

# Header:

I'm a markdown link to the [second header](#Second-header)!

## Second header {#Second-header}

##  3: Third ,#">header 

the ids it produces include:

#Header:
#Second-header-{#Second-header}
#3:-Third-,#">header

because all we're doing is replacing spaces ( ) with hyphens (-) and stripping leading and closing whitespace.

Pandoc in contrast generates these three header ids:

#header 
#Second-header
#third-header

related to some issues discussed in jupyter/nbconvert#469.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions