MCPcopy Create free account
hub / github.com/hackmdio/codimd / changeHeaderId

Function changeHeaderId

public/js/extra.js:1110–1115  ·  view source on GitHub ↗
($header, id, newId)

Source from the content-addressed store, hash-verified

1108}
1109
1110function changeHeaderId ($header, id, newId) {
1111 $header.attr('id', newId)
1112 const $headerLink = $header.find(`> a.anchor[href="#${id}"]`)
1113 $headerLink.attr('href', `#${newId}`)
1114 $headerLink.attr('title', newId)
1115}
1116
1117export function deduplicatedHeaderId (view) {
1118 // headers contained in the last change

Callers 1

deduplicatedHeaderIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected