Punctuation
Example showing how to use Comark with the punctuation plugin for smart quotes, dashes, and symbols in Vue and Vite.
Select a file to view its contents
Features
This example demonstrates the punctuation plugin in Vue:
- Smart quotes:
"text"→ “text”,'text'→ ‘text’ - Dashes:
--→ – (en-dash),---→ — (em-dash) - Ellipsis:
...→ … - Symbols:
(c)→ ©,(r)→ ®,(tm)→ ™,+-→ ±
Usage
<script setup lang="ts">
import { Comark } from '@comark/vue'
import punctuation from '@comark/vue/plugins/punctuation'
</script>
<template>
<Suspense>
<Comark :plugins="[punctuation()]">{{ markdown }}</Comark>
</Suspense>
</template>