Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Image-validation #144

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add spoiler tag functionality to CodeMirror
darling committed Nov 15, 2023

Unverified

This user has not yet uploaded their public signing key.
commit 9c2389af886947e7ec90df2dddc79dc1c0ffb629
4 changes: 3 additions & 1 deletion lib/helpers/codemirror.ts
Original file line number Diff line number Diff line change
@@ -23,7 +23,9 @@ const toggleCodeBlock: Command = ({ state, dispatch }) => {
}

const toggleSpoiler: Command = ({ state, dispatch }) => {
return toggleAround(state, dispatch, '||', '||')
// Insert details tag with a summary tag at the start
const detailsTags = ['\n<details>\n<summary>Spoiler</summary>\n\n', '\n\n</details>\n\n']
return toggleAround(state, dispatch, detailsTags[0], detailsTags[1])
}

const toggleHeader: Command = ({ state, dispatch }) => {