mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
docs: consolidate docs (#2182)
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
8d46d7e39e
commit
ecffebc43c
307 changed files with 1474 additions and 487 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
@ -11,7 +11,7 @@ import type { LineMarkerPosition } from '../markdown-extension/linemarker/types'
|
|||
import type { LineMarkers } from '../markdown-extension/linemarker/add-line-marker-markdown-it-plugin'
|
||||
import useResizeObserver from '@react-hook/resize-observer'
|
||||
|
||||
export const calculateLineMarkerPositions = (
|
||||
const calculateLineMarkerPositions = (
|
||||
documentElement: HTMLDivElement,
|
||||
currentLineMarkers: LineMarkers[],
|
||||
offset?: number
|
||||
|
@ -47,6 +47,14 @@ export const calculateLineMarkerPositions = (
|
|||
return lineMarkerPositions
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the positions of the given {@link LineMarkers} in the given {@link Document}.
|
||||
*
|
||||
* @param documentElement A reference to the rendered document.
|
||||
* @param lineMarkers A list of {@link LineMarkers}
|
||||
* @param onLineMarkerPositionChanged The callback to call if the {@link LineMarkerPosition line marker positions} change e.g. by rendering or resizing.
|
||||
* @param offset The optional offset
|
||||
*/
|
||||
export const useCalculateLineMarkerPosition = (
|
||||
documentElement: RefObject<HTMLDivElement>,
|
||||
lineMarkers?: LineMarkers[],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
@ -70,7 +70,7 @@ export class LineIdMapper {
|
|||
* Defines if the given {@link LineChange change} is neither adding or removing lines.
|
||||
*
|
||||
* @param change The {@link LineChange change} to check.
|
||||
* @return {@code true} if the given change is neither adding or removing lines.
|
||||
* @return {@link true} if the given change is neither adding nor removing lines.
|
||||
*/
|
||||
private static changeIsNotChangingLines(change: LineChange): boolean {
|
||||
return change.added === undefined && change.removed === undefined
|
||||
|
@ -80,7 +80,7 @@ export class LineIdMapper {
|
|||
* Defines if the given {@link LineChange change} contains new, not existing lines.
|
||||
*
|
||||
* @param change The {@link LineChange change} to check.
|
||||
* @return {@code true} if the given change contains {@link NewLine new lines}
|
||||
* @return {@link true} if the given change contains {@link NewLine new lines}
|
||||
*/
|
||||
private static changeIsAddingLines(change: LineChange): change is ArrayChange<NewLine> {
|
||||
return change.removed === true
|
||||
|
|
|
@ -165,6 +165,7 @@ export class NodeToReactTransformer {
|
|||
*
|
||||
* @param node The node to render
|
||||
* @param key The unique key for the node
|
||||
* @return The rendered {@link ValidReactDomElement}
|
||||
*/
|
||||
private renderNativeNode = (node: Element, key: string): ValidReactDomElement => {
|
||||
if (node.attribs === undefined) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue