Skip to content

Commit

Permalink
update vite port
Browse files Browse the repository at this point in the history
  • Loading branch information
timlrx committed Oct 12, 2023
1 parent cbc0c90 commit 4a654f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion demo/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const config = {
/* Run your local dev server before starting the tests */
webServer: {
command: 'npm run vite',
port: 3000,
port: 5173,
},
}

Expand Down
2 changes: 1 addition & 1 deletion demo/test/app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { test, expect } from '@playwright/test'

test('should work in a client env', async ({ page }) => {
await page.goto('http://localhost:3000')
await page.goto('http://localhost:5173')
const locator = page.locator('id=results')
await expect(locator).toContainText('(Nash, 1950, pp. iv, vi–xi, (xv)-(xvii))')
})
8 changes: 7 additions & 1 deletion src/gen-citation.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ export const genCitation = (
// Do not link bracket
const output = isComposite
? `<a href="#bib-${entries[0].id.toLowerCase()}">${citationText}</a>`
: `${citationText.slice(0, 1)}<a href="#bib-${entries[0].id.toLowerCase()}">${citationText.slice(1, -1)}</a>${citationText.slice(-1)}`
: `${citationText.slice(
0,
1
)}<a href="#bib-${entries[0].id.toLowerCase()}">${citationText.slice(
1,
-1
)}</a>${citationText.slice(-1)}`
return [
citationText,
htmlToHast(`<span class="${(inlineClass ?? []).join(' ')}" id=${ids}>${output}</span>`),
Expand Down

0 comments on commit 4a654f3

Please sign in to comment.