forked from mirror/cinny
fix flake.nix
This commit is contained in:
parent
4b71372ba8
commit
a430a6af35
3 changed files with 13 additions and 14 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -4,4 +4,5 @@ node_modules
|
|||
devAssets
|
||||
|
||||
.DS_Store
|
||||
.idea
|
||||
.idea
|
||||
result
|
||||
|
|
15
flake.nix
15
flake.nix
|
@ -7,16 +7,17 @@
|
|||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
der = pkgs.stdenv.mkDerivation {
|
||||
cinny = pkgs.buildNpmPackage {
|
||||
name = "cinny";
|
||||
src = ./.;
|
||||
buildInputs = [pkgs.nodejs_latest pkgs.nodePackages.pnpm];
|
||||
unpackPhase = "true";
|
||||
configurePhase = "pnpm install";
|
||||
buildPhase = "pnpm run build";
|
||||
installPhase = "mv dist $out";
|
||||
npmDepsHash = "sha256-E48xV3Lil7n4xxEeUpuiF8LEGkJc+GXRRK1TSbkOcgk=";
|
||||
nativeBuildInputs = with pkgs; [ python3 pkg-config ];
|
||||
buildInputs = with pkgs; [ pixman cairo pango ];
|
||||
installPhase = ''
|
||||
cp -r dist $out
|
||||
'';
|
||||
};
|
||||
in {
|
||||
packages.default = der;
|
||||
packages.default = cinny;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import { withHistory } from 'slate-history';
|
|||
import { BlockType } from './types';
|
||||
import { RenderElement } from './Elements';
|
||||
import { CustomElement } from './slate';
|
||||
import { mdParser } from '../../../util/markdown';
|
||||
import { parseBlockMD, parseInlineMD } from '../../plugins/markdown';
|
||||
import type { SingleASTNode } from '@khanacademy/simple-markdown';
|
||||
import '../../molecules/markdown-input/MarkdownInput.scss';
|
||||
import * as css from './Editor.css';
|
||||
|
@ -204,12 +204,9 @@ export const CustomEditor = forwardRef<HTMLDivElement, CustomEditorProps>(
|
|||
|
||||
// const emojis = getShortcodeToEmoji(this.matrixClient, [room, ...parentRooms]);
|
||||
|
||||
const content = mdParser(node.text, {
|
||||
userNames: [],
|
||||
emojis: {},
|
||||
});
|
||||
// const content = parseBlockMD(node.text, parseInlineMD);
|
||||
|
||||
addRanges(content);
|
||||
// addRanges(content);
|
||||
|
||||
// add final syntax range
|
||||
if (position < node.text.length) {
|
||||
|
|
Loading…
Reference in a new issue