Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 7, 2024
1 parent c7a658e commit feeec02
Show file tree
Hide file tree
Showing 7 changed files with 180 additions and 177 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
name: ${{matrix.node}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{matrix.node}}
- run: npm install
- run: npm test
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
strategy:
matrix:
node:
Expand Down
12 changes: 7 additions & 5 deletions lib/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,16 @@ export function footer(state) {
let referenceIndex = -1

while (++referenceIndex < state.footnoteOrder.length) {
const def = state.footnoteById.get(state.footnoteOrder[referenceIndex])
const definition = state.footnoteById.get(
state.footnoteOrder[referenceIndex]
)

if (!def) {
if (!definition) {
continue
}

const content = state.all(def)
const id = String(def.identifier).toUpperCase()
const content = state.all(definition)
const id = String(definition.identifier).toUpperCase()
const safeId = normalizeUri(id.toLowerCase())
let rereferenceIndex = 0
/** @type {Array<ElementContent>} */
Expand Down Expand Up @@ -214,7 +216,7 @@ export function footer(state) {
children: state.wrap(content, true)
}

state.patch(def, listItem)
state.patch(definition, listItem)

listItems.push(listItem)
}
Expand Down
10 changes: 5 additions & 5 deletions lib/handlers/image-reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ import {revert} from '../revert.js'
*/
export function imageReference(state, node) {
const id = String(node.identifier).toUpperCase()
const def = state.definitionById.get(id)
const definition = state.definitionById.get(id)

if (!def) {
if (!definition) {
return revert(state, node)
}

/** @type {Properties} */
const properties = {src: normalizeUri(def.url || ''), alt: node.alt}
const properties = {src: normalizeUri(definition.url || ''), alt: node.alt}

if (def.title !== null && def.title !== undefined) {
properties.title = def.title
if (definition.title !== null && definition.title !== undefined) {
properties.title = definition.title
}

/** @type {Element} */
Expand Down
10 changes: 5 additions & 5 deletions lib/handlers/link-reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ import {revert} from '../revert.js'
*/
export function linkReference(state, node) {
const id = String(node.identifier).toUpperCase()
const def = state.definitionById.get(id)
const definition = state.definitionById.get(id)

if (!def) {
if (!definition) {
return revert(state, node)
}

/** @type {Properties} */
const properties = {href: normalizeUri(def.url || '')}
const properties = {href: normalizeUri(definition.url || '')}

if (def.title !== null && def.title !== undefined) {
properties.title = def.title
if (definition.title !== null && definition.title !== undefined) {
properties.title = definition.title
}

/** @type {Element} */
Expand Down
2 changes: 1 addition & 1 deletion lib/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
* pass an empty string.
* You can also add different properties.
*
* > 👉 **Note**: `id: 'footnote-label'` is always added, because footnote
* > **Note**: `id: 'footnote-label'` is always added, because footnote
* > calls use it with `aria-describedby` to provide an accessible label.
* @property {string | null | undefined} [footnoteLabelTagName='h2']
* HTML tag name to use for the footnote label element (default: `'h2'`).
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@
"@types/ungap__structured-clone": "^1.0.0",
"c8": "^9.0.0",
"hast-util-to-html": "^9.0.0",
"hastscript": "^8.0.0",
"hastscript": "^9.0.0",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-gfm": "^3.0.0",
"micromark-extension-gfm": "^3.0.0",
"prettier": "^3.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^10.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.56.0"
"typescript": "^5.5.1-rc",
"xo": "^0.58.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
Expand Down
Loading

0 comments on commit feeec02

Please sign in to comment.