profile
viewpoint
Marijn Haverbeke marijnh Berlin http://marijnhaverbeke.nl Independent open-source programmer person

acornjs/acorn 6351

A small, fast, JavaScript-based JavaScript parser

marijnh/Eloquent-JavaScript 2424

The sources for the Eloquent JavaScript book

codemirror/CodeMirror-v1 358

An editable-iframe based code editor in JavaScript. See https://github.com/marijnh/CodeMirror for the currently maintained version

marijnh/Eloquent-JavaScript-1st-edition 317

The source for http://eloquentjavascript.net

lezer-parser/lezer 235

Incremental parsing system

akapav/js 169

JavaScript compiler for Common Lisp

lezer-parser/lezer-generator 40

Parser generator for the lezer incremental parser

marijnh/browserkeymap 40

Map key events to key names, and key names to values

marijnh/distfs 40

Mount a directory of ES6 code as a FUSE directory of babel-compiled output

marijnh/cetriolo 19

Time management tool

issue closedcodemirror/codemirror.next

Order of extensions configuration

Hey, I wanted to define my custom highlighter config and I was surprised that for I need to define it before using basicSetup:

extensions: [
  myHighlighter,
  basicSetup,
]

Shouldn't it work that the extension added later overrides previous one? So you can import some defaults and then override some of them with custom one?

closed time in an hour

NagRock

issue commentcodemirror/codemirror.next

Order of extensions configuration

Shouldn't it work that the extension added later overrides previous one?

No, it's the other way round in this system—those that appear earlier get higher precedence.

NagRock

comment created time in an hour

issue commentcodemirror/codemirror.next

Support automatic outdent when entering closing delimeter on indented line

Does attached patch cover what you're looking for?

juliusv

comment created time in 16 hours

push eventcodemirror/codemirror.next

Marijn Haverbeke

commit sha 621e324f48bdef5076f9e32c2fc528e2ed38e5ab

Change the way transactions are built up FEATURE: Transactions now have a `newDoc` property that allows you to access the updated document before the new state has been created. BREAKING: Transaction and change filters are now passed a full transaction as argument. BREAKING: The `ResolvedTransactionSpec` type is no longer part of the interface. BREAKING: The `reconfigured` property on transactions has been renamed to `reconfigure`. Similarly, the `scrolledIntoView` property is now called `scrollIntoView`.

view details

Marijn Haverbeke

commit sha ef1ce0d222311ce74604f36866c67da6289daf62

Replace indentWithTabs with an indentString utility BREAKING: Editor state objects no longer have an `indentWithTabs` property. FEATURE: The `indentString` property on editor states can be used to compute an indentation string of a given column width.

view details

Marijn Haverbeke

commit sha 97fbdac8bc0b8ad2d5196980ff92b5f3fe6035e9

Add an initial implementation of an indentOnInput extension Issue #264 FEATURE: The view package now exports an `indentOnInput` extension that enables automatic reindentation when certain patterns are typed at the start of a line. The basic setup enables this.

view details

push time in 16 hours

push eventcodemirror/codemirror.next

Marijn Haverbeke

commit sha c5b8b417545ff7531fd18396812f3f20d2806df3

Adjust to hidden internals in lezer-tree

view details

Marijn Haverbeke

commit sha d136b7103bc0bc63986610f6145b69cf5070586b

Upgrade to Lezer 0.10.0

view details

Marijn Haverbeke

commit sha 6bbd8d2d7e23c9d05c52d9b08bbc60a2acd18dd5

Add styling info for TS and JSX tokens

view details

Marijn Haverbeke

commit sha 1846e23dd8d94f83d043aec27dd9354a1d3f83e8

Make LezerSyntax capable of passing a dialect FEATURE: A `LezerSyntax` instance can now specify a dialect to parser. BREAKING: `LezerSyntax` instances are now created with `LezerSyntax.define` instead of `new LezerSyntax`.

view details

push time in a day

issue closedcodemirror/CodeMirror

editor.save() do not replace textarea value on paste event.

Hello,

When I enter text to codemirror manually - it correctly updates the textarea.

But when I try to paste some value to codemirror - I do not fetch any update in editor.save(text). At the same time, in console.log(text), I can see the pasted value in the console.

What am I doing wrong?

const editor = CodeMirror.fromTextArea(document.getElementById('cm_textarea'),
    {
      mode: "text/html",
      lineNumbers: true,
      theme: "material"
    });

    editor.on('change', (editor) => {
      const text = editor.getValue()
      console.log(text)
      editor.save(text)
    })

closed time in a day

Bogdan1001

issue commentcodemirror/CodeMirror

editor.save() do not replace textarea value on paste event.

I do not fetch any update in editor.save(text)

What's text? The save method doesn't take any arguments.

Bogdan1001

comment created time in 2 days

PR closed ProseMirror/prosemirror-view

Remove redundant white-space style

It looks like the duplicate white-space is unintentional, so I am sending this PR to remove it.

+0 -1

1 comment

1 changed file

kepta

pr closed time in 2 days

pull request commentProseMirror/prosemirror-view

Remove redundant white-space style

The duplication is intentional, and provides a fallback for browsers that don't support break-spaces (they'll use pre-wrap).

kepta

comment created time in 2 days

pull request commentcodemirror/CodeMirror

customs addons for ISL

Sorry, but we're not adding further contributed modules to the library. The best way to distribute this would be as a separate npm package.

KinjalHinsu

comment created time in 3 days

push eventcodemirror/CodeMirror

Marijn Haverbeke

commit sha def6f5b125a77607085ce17c371e0995be96832a

[julia mode] Make sure dedent tokens end in a word boundary Closes #6376

view details

push time in 3 days

issue closedcodemirror/CodeMirror

In Julia language, variable name starting with end gets dedented incorrectly

This was discovered using the Pluto.jl reactive notebook environment.

If one types

begin
enda = 1
end

as soon as the end of enda is typed, it is dedented (as if it is an end keyword), requiring the user to manually correct the indent level.

closed time in 3 days

klaff

issue commentcodemirror/CodeMirror

auto move the cursor to the middle of /* */ without selection comment

If I'm guessing correctly that Stylus is calling the blockComment method when this functionality is activated with fullLines: false, then the attached patch might help.

dnknn

comment created time in 4 days

push eventcodemirror/CodeMirror

Marijn Haverbeke

commit sha 26b739ffef2187ce942474cef4a636e9c65f9294

[comment addon] Keep selection in front of closing marker when block-commenting ... with fullLines==false when the end of the selection is directly on the closing marker. Closes #6375

view details

push time in 4 days

issue closedcodemirror/CodeMirror

auto move the cursor to the middle of /* */ without selection comment

After inserting a comment when without selection, auto move the cursor to the middle of /**/

seeing to 👇 https://github.com/openstyles/stylus/issues/1012

closed time in 4 days

dnknn

issue commentopenstyles/stylus

After inserting a comment when without selection, auto move the cursor to the middle of /**/

@tophf Please don't just send users requests over to open source libraries to depend on. End users don't typically have the context on what the library is or which functionality is being exercised to provide a useful bug report. If you don't want to take the time to open an actionable, clear bug report yourself, just keep me out of it. You're already using my software, I don't provide a help desk service for your users.

dnknn

comment created time in 4 days

push eventlezer-parser/website

Marijn Haverbeke

commit sha 0be02bd4251db612162cddc73bf58fa35a046bed

Small tweaks to guide text

view details

push time in 4 days

push eventlezer-parser/website

Marijn Haverbeke

commit sha 3bc3e15ee541105a81175104c1c7333ff88a5404

Fix typo

view details

push time in 4 days

push eventlezer-parser/website

Marijn Haverbeke

commit sha 3769ab5540e8f2e42b01be13e803454c3bc49279

Fix outdated reference to removed prop in guide

view details

push time in 4 days

push eventlezer-parser/website

Marijn Haverbeke

commit sha 5a36aee26a607b1bd1ffe34b6e6559569ad4ce75

Fix heading depth

view details

push time in 4 days

push eventlezer-parser/website

Marijn Haverbeke

commit sha 1cf92cd58fa57dfc27cf5e3c6298863584315c54

Show a table of contents on the guide and reference manual

view details

push time in 4 days

push eventcodemirror/website

Marijn Haverbeke

commit sha 3f8cabcdd5b74639cbf4ea7d0183ede5a851e7ba

Fix some issues in the table of contents

view details

push time in 4 days

issue closedcodemirror/CodeMirror

For`CodeMirror.fromTextArea(editorElem, options)`instance, how to switch theme and programming language?

Hi, I have created an instance editor which is created by calling CodeMirror.fromTextArea(textarea_element, options)

However, I wanted to change the themes and programming languages dynamic( adding dropdowns for this)

how to implement this function? 🙏🙏🙏

closed time in 4 days

WxxShirley

issue commentcodemirror/CodeMirror

For`CodeMirror.fromTextArea(editorElem, options)`instance, how to switch theme and programming language?

Use the setOption method on the editor instance that returns.

Next time, please don't use the bug tracker for questions. We have a forum for that.

WxxShirley

comment created time in 4 days

PR closed ProseMirror/prosemirror-state

Flexible plugins configuration

The reason to do so:

  1. plugins's order is important(influence the invoke order of transactions, events, etc)
  2. when need to disable some plugin in first loading by some config, there is no way to do it

So is the way below is more flexible plugins configuration?

let isAndroid = true; // some config pass by useragent or something else;
let somePlugin = xxx;
let state = EditorState.create({
  schema,
  props,
  plugins: [
    isAndroid ? somePlugin : null,
    otherPlugin
  ]
});
+1 -1

3 comments

1 changed file

Xheldon

pr closed time in 4 days

pull request commentProseMirror/prosemirror-state

Flexible plugins configuration

What's "intuitive" is always hard to argue, but I prefer the simpler types of the current way it works.

Xheldon

comment created time in 4 days

created taglezer-parser/lezer-generator

tag0.10.1

Parser generator for the lezer incremental parser

created time in 4 days

push eventlezer-parser/lezer-generator

Marijn Haverbeke

commit sha fcb7f5d22629580313b3b033df9704ac8fc7db29

Fix a bug in the code generator for serialized parsers

view details

Marijn Haverbeke

commit sha 36a7f11cd8d640cb60e5f1c2bea8c081cc9343af

Mark version 0.10.1

view details

push time in 4 days

created taglezer-parser/python

tag0.10.0

A Python parser for Lezer

created time in 4 days

push eventlezer-parser/python

Marijn Haverbeke

commit sha 8bf057165a5b3617cecdb0b3df4a3962d3a168cc

Mark the newline tokenizers as fallback

view details

Marijn Haverbeke

commit sha 711a17947bba123a39dd068943dcb2f9fa522ad4

Mark version 0.10.0

view details

push time in 4 days

created taglezer-parser/html

tag0.10.0

An HTML parser for Lezer

created time in 4 days

push eventlezer-parser/html

Marijn Haverbeke

commit sha 1a3b713758ddef7fbc9f66159a51a9f251113670

Mark version 0.10.0

view details

push time in 4 days

created taglezer-parser/xml

tag0.10.0

An XML parser for lezer

created time in 4 days

created taglezer-parser/xml

tag0.9.0

An XML parser for lezer

created time in 4 days

push eventlezer-parser/xml

Marijn Haverbeke

commit sha 5902f0984f5404b5a101fc0597748cbacf1ae143

Add openedBy/closedBy node props FEATURE: Tag start/end tokens now have `NodeProp.openedBy`/`closedBy` props.

view details

Marijn Haverbeke

commit sha 9ca7e7a738d91f4a598db6a8953196f427fbcad0

Mark version 0.9.0

view details

Marijn Haverbeke

commit sha ecca199fd47c3a5058309bcfe47bbb1e7d5fadf7

Mark version 0.10.0

view details

push time in 4 days

created taglezer-parser/css

tag0.10.0

CSS grammar for lezer

created time in 4 days

push eventlezer-parser/css

Marijn Haverbeke

commit sha 5ee5a455e15f8a96686820e3bdec5861f800c5c2

Mark version 0.10.0

view details

push time in 4 days

created taglezer-parser/javascript

tag0.10.0

A JavaScript lezer grammar

created time in 4 days

push eventlezer-parser/javascript

Marijn Haverbeke

commit sha d781be8931a931e6167a9b1de773217a3712c857

Move all ++/-- parsing into an external tokenizer

view details

Marijn Haverbeke

commit sha 0def6cde3612b663961c7d156a3f629b9d56541a

Add support for JSX FEATURE: The grammar can now parse JSX syntax.

view details

Marijn Haverbeke

commit sha 278c643ad0e2afe7627f6f20435b9ff2604c5780

Mark the semicolon-insertion tokenizer as fallback

view details

Marijn Haverbeke

commit sha 70c92e314ebb8e47c4031e7370461b722f431524

Start adding TypeScript constructs

view details

Marijn Haverbeke

commit sha 0740b29bd2d79036c9ff2679c9363564f0a1d17b

Further improve TypeScript support

view details

Marijn Haverbeke

commit sha 18697dc68145a8a9e29e4f058d2f803d43372330

Add support for extending a type expr in TS

view details

Marijn Haverbeke

commit sha 4ef0a6394464a73c14ccf6594a7855506685ba93

Misc tweaks and improvements to TS support

view details

Marijn Haverbeke

commit sha 7eca47f2c4894fdc1c3d131bf2c59ccb89fc3705

Add support for TS ambient declarations

view details

Marijn Haverbeke

commit sha 2c69ee2ab55850b01f68021d62a3328a2aec82da

Tie up some loose ends in TS syntax

view details

Marijn Haverbeke

commit sha 29233b429759993fc334c29f77d5b114e900f170

Mark version 0.10.0

view details

push time in 4 days

push eventlezer-parser/website

Marijn Haverbeke

commit sha 940326c0ec54ea0874b186bb5448c54b5bfde1b6

Describe dialects in the guide

view details

push time in 4 days

created taglezer-parser/lezer-generator

tag0.10.0

Parser generator for the lezer incremental parser

created time in 4 days

push eventlezer-parser/lezer-generator

Marijn Haverbeke

commit sha b73219745d0a68e39c0ed369522c7e6e0ba3fbae

Provide examples in overlapping token errors FIX: The error message for overlapping tokens is a bit more concrete now, including an example of a string that matches both tokens.

view details

Marijn Haverbeke

commit sha d9c6c9b7f4ec2227c76d56ee73247daf853a7dc3

Support fallback property on temp tokenizers

view details

Marijn Haverbeke

commit sha 12a82eb03eb6ee66c22381de73510a6238ae711b

Small code style tweaks in test.ts

view details

Marijn Haverbeke

commit sha ffa846b723aee7082ccf9bb5db5cc26f5fdb786d

Add a comment for buildTokenGroups

view details

Marijn Haverbeke

commit sha f541fa5c9345fa4286d4763099b9dcf819eca490

Add support for dialects and conditional tokens FEATURE: Add support for grammar dialects and tokens that are only allowed in a given dialect.

view details

Marijn Haverbeke

commit sha 278aee464557f10228fc753c9db7d77c391b7075

Pass maxTerm to the parser

view details

Marijn Haverbeke

commit sha 358fefc26ea3a17d67cfffe1a9057395b6161f44

Abuse the type system to work around non-exported internals in lezer Introduces a bunch of unfortunate casts to any, but doesn't seem bad enough to warrant creating duplicate type declarations for lezer (once with internals for lezer-generator, once without for everybody else).

view details

Marijn Haverbeke

commit sha e08bdfa3e74a6d4824032c6e397ac95e508bf11b

Add basic dialect test

view details

Marijn Haverbeke

commit sha 06cb34c5f966267a5dcc4b17cbab4dafa558f67a

Change the way specialization is stored To prepare for user-defined specialization

view details

Marijn Haverbeke

commit sha 39b5b6ca4fbd8c05fc07f69d5f0bf68f67efa618

Add support for external specializers FEATURE: It is now possible to specialize tokens using external code.

view details

Marijn Haverbeke

commit sha c40333557ae4d1f1dfa1af77524ea4a6230bb891

Make commas optional in external token dialect, or precedence tag lists FEATURE: Commas in precedence tag, dialect, or external token lists are now optional.

view details

Marijn Haverbeke

commit sha 8feb22f0ddf1f027d92b1ea308af56a5f05e03b8

Allow dialects on token specializations

view details

Marijn Haverbeke

commit sha 45642d8ff1f8dcf5bd479998bc02978095b26523

Fix ordering bug in output of external specializer imports

view details

Marijn Haverbeke

commit sha 0435d755510680c5a98c1ef02d093f8330586f38

Fix bug in rule cache

view details

Marijn Haverbeke

commit sha a5a69d20a2c8fad53465fed55860827754bb091a

Mark version 0.10.0

view details

push time in 4 days

created taglezer-parser/lezer

tag0.10.0

Incremental parsing system

created time in 4 days

push eventlezer-parser/lezer

Marijn Haverbeke

commit sha 0cd0f8fd7be179d4a52d19fc544de33ce9464a25

Add the fallback flag to tokenizers BREAKING: The way different tokenizers are combined is now slightly different. The first one to return a token wins, even if that token has no actions in the current state. The old behavior, where further tokenizers are tried until actions are found, can be enabled for a given tokenizer by setting its `fallback` flag.

view details

Marijn Haverbeke

commit sha 9e17ebfdd36aca3c8ed9710222fbd7bf17474bde

Add a public `parser` accessor to stack objects FIX: `Stack` objects now have a `parser` getter that returns the parser object.

view details

Marijn Haverbeke

commit sha 8dc6ec12e4f2bf0b4cd5e19011c8cc8e705eb2b2

Add support for dialects FEATURE: Add support for grammar dialects.

view details

Marijn Haverbeke

commit sha b32bf4ab8fd5651beeed8d130ce71a41b815d34e

Store maxTerm in the parser, optimize Dialect.allows

view details

Marijn Haverbeke

commit sha 6ed2a02ba6860294f2032ffe5dc174852f15412d

Strip internals from type declarations

view details

Marijn Haverbeke

commit sha 64dda1c275faf0804df07e3ad5370bb7d875e70b

Follow a change in the way specialization is stored

view details

Marijn Haverbeke

commit sha 7ee4a616f1080529a025f10d7f00c7bd032adfc8

Allow a dialect to be specified for a nested parser

view details

Marijn Haverbeke

commit sha e3061f6325d62bc4c0ec5be31e2f0fc39d43818a

Test for dialects on token specializations

view details

Marijn Haverbeke

commit sha 543e4219556e86c6aa30e98ade798a123177d175

Mark version 0.10.0

view details

push time in 4 days

created taglezer-parser/lezer-tree

tag0.10.0

Packed syntax tree data structure

created time in 4 days

push eventlezer-parser/lezer-tree

Marijn Haverbeke

commit sha 2788f724bd99ff8aea2d0a7a8cf99b029af9cad3

Strip internals from TypeScript declarations

view details

Marijn Haverbeke

commit sha 5e653f9fd8cf7ea38918bdeca3cc9beb6b41bcae

Mark version 0.10.0

view details

push time in 4 days

pull request commentProseMirror/prosemirror-state

Flexible plugins configuration

How about something like plugins: [...isAndroid: [somePlugin] : [], ...otherPlugins]?

Xheldon

comment created time in 4 days

push eventProseMirror/website

Xheldon

commit sha cb106443ac824873509ffcaf5a65d98eca0e4722

Make site look normal in a simply way

view details

push time in 4 days

pull request commentacornjs/acorn

fix: acornLoose set defaultOptions to the actual default of the options parameter

The options are passed directly to new LooseParser, which passed them to Parser.tokenizer, which does the defaulting. The options object used is the one from the resulting parser instance. Can you construct an example program that demonstrates the issue?

fcbear

comment created time in 5 days

push eventcodemirror/CodeMirror

Lucas Buchala

commit sha fd3e439fd07121b58e2efd4b7c92ee1201d9be64

[mode meta] Escape dot in mode's filename regex

view details

push time in 5 days

pull request commentcodemirror/CodeMirror

Escape dot in mode's filename regex

Thank you!

lucasbuchala

comment created time in 5 days

pull request commentProseMirror/prosemirror-inputrules

feat: ignore transactions which were not added to history

we would still need to discard the transactions as soon as another transaction comes along which modifies inside of the (mapped) range of the original transaction, no?

This is the same case as step rebasing for history or collab editing. You can map steps through anything. Sometimes the result will be null (the changed content was deleted) and sometimes the step can't be applied anymore (maybeStep will return failure), so this becomes a bit more tricky to manage (probably don't want to store the plain transaction anymore, but rather an array of steps), but should be doable.

phikes

comment created time in 6 days

pull request commentProseMirror/prosemirror-inputrules

feat: ignore transactions which were not added to history

Look into position mapping—it is probably possible to update the undoable data in a safe way.

phikes

comment created time in 6 days

pull request commentProseMirror/prosemirror-inputrules

feat: ignore transactions which were not added to history

Ah, right, you're trying to avoid clearing the undo logic when something like a collaborative change comes in. But as it is, this patch isn't correct—if, for example, a non-history change inserts or deletes content before the last inputrules change, the positions in that stored change no longer align with the current document.

phikes

comment created time in 7 days

issue closedProseMirror/prosemirror

Children in a list item get deleted after enter

Issue details

Children in a list item get deleted after enter

Steps to reproduce

https://fallacious-harbor.glitch.me

  1. Place cursor on list item after two
  2. Press enter

The child node three gets deleted. I wonder if this is intended. I'm surprised by the behavior - i would expect a new empty list item to be created.

ProseMirror version

Versions that are available via the examples.

closed time in 7 days

samu

issue commentProseMirror/prosemirror

Children in a list item get deleted after enter

This patch should help with this.

samu

comment created time in 7 days

created tagProseMirror/prosemirror-schema-list

tag1.1.3

List-related schema elements and commands for ProseMirror

created time in 7 days

push eventProseMirror/prosemirror-schema-list

Marijn Haverbeke

commit sha 5a4c91221eba4c7806b84bce55781b0bbe9e9379

Fix overwriting of content by splitListItem FIX: Fix an issue where `splitListItem` could delete other content in the item when pressing enter in an empty paragraph that had other content below it in a list item. Closes #886

view details

Marijn Haverbeke

commit sha eb18fa7e25e07f2145268d577e362c3e8bd139a7

Mark version 1.1.3

view details

push time in 7 days

issue closedcodemirror/codemirror.next

Linter doesn't show the message

Don't know if I missed something. but even when I'm trying the javascript linter in the demo, I'm not able to display the message of the Diagnostic :(

I just hope it's on my side (like always have been hahaha), this feature is pretty cool ! :)

closed time in 7 days

Nexucis

issue commentcodemirror/codemirror.next

Linter doesn't show the message

Right—patch 5aac613794a03cb should address that.

Nexucis

comment created time in 7 days

pull request commentacornjs/acorn

fix for test262

Thank you for looking into those.

mysticatea

comment created time in 7 days

push eventacornjs/acorn

Toru Nagashima

commit sha c312d6d427d42535ce74e1a194093f1536f42c3c

unignore logical-assignment-operators tests

view details

Toru Nagashima

commit sha 3c8bb1d6cf3f482c5abcb14fd812c54a928608d5

update Unicode escape sequences in ES2021

view details

Toru Nagashima

commit sha 93337d04c0e4f0816680e7e6e8fef6fe5c0ca7eb

LegacyNonOctalEscapeSequence is syntax error in strict mode

view details

Toru Nagashima

commit sha d6519aa390f89dd639e5d0f6cab73b22154b7958

enable allowAwaitOutsideFunction only in module

view details

push time in 7 days

PR merged acornjs/acorn

fix for test262

This PR modifies acorn to fix test262 test failures.

  • af40e38 just unignores Logical Assignment Operators tests. This was configured accidentally in fe7b3f1...e376a66.
  • d95497d added new values of Unicode Escape Sequences for Unicode 13. (https://github.com/tc39/ecma262/pull/1896 and https://github.com/tc39/ecma262/pull/1939)
  • 5cd828a makes "\8" and "\9" in strict mode new syntax errors.
  • 719fae6 tweaks acorn's test code. The await identifiers are valid outside of async functions, but the allowAwaitOutsideFunction option breaks that. Looks like the option is enabled in order to pass the tests of Top-Level await syntax. But I'm not sure if it should enable the allowAwaitOutsideFunction option because the syntax is Stage 3.
+15 -45

0 comment

5 changed files

mysticatea

pr closed time in 7 days

issue closedacornjs/acorn

Removing ALL start/end

Hey Acorn team, I know there is a flag for removing the loc node from the output, but the start and end nodes still exist. Would you support a PR to add a flag to remove these nodes?

I see https://github.com/acornjs/acorn/issues/251, but that was 5 years ago so maybe this feature is welcome?

Thanks

closed time in 7 days

1fabunicorn

issue commentacornjs/acorn

Removing ALL start/end

Right now I am just removing them from the json, but this is not efficient.

I think you're just going to have to live with that (or adjust your hashing logic).

1fabunicorn

comment created time in 7 days

issue commentProseMirror/prosemirror

Is this change to Transform.replace intentional or a bug?

Seems you didn't provide any examples of inputs that produce the change in behavior, and the code you pasted is just the replace method from the library. I'm going to need some way to reproduce this, if you want me to investigate.

lastnigtic

comment created time in 7 days

pull request commentProseMirror/prosemirror-inputrules

feat: ignore transactions which were not added to history

I think its reasonable that this plugin ignores these transactions as well as they are not undoable by the undo command anyways.

Why?

phikes

comment created time in 7 days

issue commentcodemirror/codemirror.next

Linter doesn't show the message

And then when I'm trying this setup, here what I have:

That's how ESLint works—if there's a syntax error in the code, it'll only show that error. That's the little red triangle you're seeing. Hovering over that should show the message (though that is likely broken in 0.9.0).

Nexucis

comment created time in 7 days

issue commentcodemirror/codemirror.next

Linter doesn't show the message

Hard to say, since you tell us almost nothing about what you tried. There's some commented lines in demo/demo.ts in the repository that, when uncommented, enable the JS linter (all those that mention lint). Do those help?

Nexucis

comment created time in 7 days

issue commentcodemirror/CodeMirror

addon/closebrackets.js can not work in mobile

It'd be nice if you could put a bit more effort into a bug report. Does 'mobile' mean Chrome Android in this case, or did you test more browsers?

ahong-qin

comment created time in 7 days

issue commentacornjs/acorn

Removing ALL start/end

The parser uses these internally, so I don't think this is practical. Why do you need this?

1fabunicorn

comment created time in 7 days

pull request commentacornjs/acorn

Major release 8.0.0

@1fabunicorn Barging into an entirely unrelated issue with an off topic question is not helpful. Please don't do that, in the future.

marijnh

comment created time in 7 days

Pull request review commentacornjs/acorn

Major release 8.0.0

 export const defaultOptions = {  // Interpret and default an options object +let warnedAboutEcmaVersion = false+ export function getOptions(opts) {   let options = {}    for (let opt in defaultOptions)     options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt] -  if (options.ecmaVersion >= 2015)+  if (options.ecmaVersion === "latest") {+    options.ecmaVersion = 1e8+  } else if (options.ecmaVersion == null) {+    if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) {+      warnedAboutEcmaVersion = true+      console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")+    }+    options.ecmaVersion = 11+  } else if (options.ecmaVersion >= 2015) {

It costs us almost nothing to support these, and since we'll need to support non-year versions for the old versions anyway, it seems reasonable to support them for all versions.

marijnh

comment created time in 8 days

Pull request review commentacornjs/acorn

Major release 8.0.0

 export const defaultOptions = {  // Interpret and default an options object +let warnedAboutEcmaVersion = false+ export function getOptions(opts) {   let options = {}    for (let opt in defaultOptions)     options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt] -  if (options.ecmaVersion >= 2015)+  if (options.ecmaVersion === "latest") {+    options.ecmaVersion = 1e8+  } else if (options.ecmaVersion == null) {

I put it here to avoid relying on the not very obvious behavior of comparing to null/undefined in the next branch.

marijnh

comment created time in 8 days

Pull request review commentacornjs/acorn

Major release 8.0.0

 export const defaultOptions = {  // Interpret and default an options object +let warnedAboutEcmaVersion = false+ export function getOptions(opts) {   let options = {}    for (let opt in defaultOptions)     options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt] -  if (options.ecmaVersion >= 2015)+  if (options.ecmaVersion === "latest") {+    options.ecmaVersion = 1e8

That'll make the field a float, potentially making comparisons more expensive. 1e8 fits into a 30-bit integer, and it doesn't seem likely that we'll reach that ecma version ever, so I prefer that.

marijnh

comment created time in 8 days

pull request commentacornjs/acorn

Revamp checkLVal()

See #971 to hopefully merge this.

TimothyGu

comment created time in 8 days

issue commentcodemirror/codemirror.next

tooltips don't seem to show up when the editor is in shadow DOM

In Chrome Linux, even with nested shadow roots like that, mousemove events are delivered with the appropriate target for me. That's what the standard requires, too. Make sure you don't have a pointer-events: none style in there somewhere. If you can't find the problem, try reducing the setup needed to trigger this to the minimum code necessary (no frameworks, external libraries, etc), and I can take a look.

clementbtc

comment created time in 8 days

PR opened acornjs/acorn

Major release 8.0.0

This does three things:

  • Merge #893 (resolving a minor merge conflict)

  • Add exports sections to the package.json files so that node 13+ can load them as ES modules

  • Add a deprecation warning when no ecmaVersion option is specified. Add a "latest" value for that option that allows everything we support to be parsed.

I'm going to let this sit here for review and comment for a bit, and if everything looks okay, merge it and release 8.0.0.

cc @RReverser @adrianheine

+181 -80

0 comment

14 changed files

pr created time in 8 days

push eventacornjs/acorn

Marijn Haverbeke

commit sha 3bf92f5b1cdc4f3b83127184af1ba2ee57a0864c

Make ecmaVersion a required option (With a warning that defaults it to 2020 for the time being.)

view details

push time in 8 days

create barnchacornjs/acorn

branch : v8

created branch time in 8 days

created tagacornjs/acorn

tag7.4.0

A small, fast, JavaScript-based JavaScript parser

created time in 8 days

push eventacornjs/acorn

Marijn Haverbeke

commit sha 54efb62138c54f523413fb6a6c00c57c81e81f54

Mark version 7.4.0

view details

push time in 8 days

push eventacornjs/acorn

Toru Nagashima

commit sha d20ade2929485f9f875a4bc4f2834b567e82865f

update test262

view details

Toru Nagashima

commit sha e376a6631a72dff57a20ff11ba527838a555c58a

add numeric separators

view details

Marijn Haverbeke

commit sha 856b720cc7f971844c5bf3ea2ac072d574cc3bbf

Remove link to plugin that's part of the repository now

view details

push time in 8 days

PR closed acornjs/acorn

add numeric separators

This PR adds Numeric Separators syntax that has been at Stage 4.

Upstreams:

  • https://github.com/tc39/ecma262/pull/2043
  • https://github.com/tc39/test262/pull/1189, https://github.com/tc39/test262/pull/2245, https://github.com/tc39/test262/pull/2252
  • (no PRs in ESTree)
+252 -25

2 comments

8 changed files

mysticatea

pr closed time in 8 days

pull request commentacornjs/acorn

add numeric separators

Thanks! Merged in fe7b3f1ee5fc...e376a6631a72df. Readme link to plugin removed in 856b720cc7f

mysticatea

comment created time in 8 days

pull request commentacornjs/acorn

add logical assignment operators

Thank you!

mysticatea

comment created time in 8 days

push eventacornjs/acorn

Toru Nagashima

commit sha 459fa1eb8e8b7771496551e2d6e71937ff3a649c

update test262

view details

Toru Nagashima

commit sha fe7b3f1ee5fc492beba8cb3d3ba1ad8626dc7265

add logical assignment operators

view details

push time in 8 days

PR merged acornjs/acorn

add logical assignment operators

This PR adds Logical Assignment Operators syntax that has been at Stage 4.

Upstreams:

  • https://github.com/tc39/ecma262/pull/2030
  • https://github.com/tc39/test262/pull/2559, https://github.com/tc39/test262/pull/2560
  • https://github.com/estree/estree/pull/233
+203 -15

0 comment

6 changed files

mysticatea

pr closed time in 8 days

issue closedacornjs/acorn

Dynamic import is not working (SyntaxError: Unexpected token)

Seems like acorn is not supporting dynamic import statements. I saw issue #809, but i'm not sure if this is related, because some comments say something about a dependency to npm, but i can reproduce it without npm.

How to reproduce

let acorn = require("acorn");

let code = `async function load() {
    let say = await import('./say.js');
}`;

console.log(acorn.parse(code));

Output

SyntaxError: Unexpected token (2:20)
    at Parser.pp$4.raise (./node_modules/acorn/dist/acorn.js:2927:15)
    at Parser.pp.unexpected (./node_modules/acorn/dist/acorn.js:698:10)
    at Parser.pp$3.parseExprAtom (./node_modules/acorn/dist/acorn.js:2322:21)
    at Parser.pp$3.parseExprSubscripts (./node_modules/acorn/dist/acorn.js:2129:21)
    at Parser.pp$3.parseMaybeUnary (./node_modules/acorn/dist/acorn.js:2106:19)
    at Parser.pp$3.parseAwait (./node_modules/acorn/dist/acorn.js:2912:26)
    at Parser.pp$3.parseMaybeUnary (./node_modules/acorn/dist/acorn.js:2090:19)
    at Parser.pp$3.parseExprOps (./node_modules/acorn/dist/acorn.js:2041:21)
    at Parser.pp$3.parseMaybeConditional (./node_modules/acorn/dist/acorn.js:2024:21)
    at Parser.pp$3.parseMaybeAssign (./node_modules/acorn/dist/acorn.js:1997:21) {
  pos: 44,
  loc: Position { line: 2, column: 20 },
  raisedAt: 50
}

Version node v12.18.2 acorn 7.3.1

closed time in 8 days

gseidel

issue commentacornjs/acorn

Dynamic import is not working (SyntaxError: Unexpected token)

You have to specify ecmaVersion: 11 to parse dynamic import.

gseidel

comment created time in 8 days

issue commentcodemirror/codemirror.next

tooltips don't seem to show up when the editor is in shadow DOM

I messed up patch 399d40736a (it seems the event issue has nothing to do with the shadow dom). That's fixed in 5aac613.

the target of all the mousemouse events is the shadow element

That's odd. It should definitely not do that (and doesn't seem to do that when I set up a test). Can you tell me which browser this happens in and what your setup looks like?

clementbtc

comment created time in 9 days

push eventcodemirror/codemirror.next

Marijn Haverbeke

commit sha 5aac613794a03cbf35fe55e88c2dbe686c3313a8

Properly fix event registration in tooltip.ts Issue #253 Issue #260

view details

push time in 9 days

issue commentcodemirror/codemirror.next

v0.9.0 not properly packaged

You did help me notice that the website dir is accidentally in the published package (despite being in .npmignore, sigh).

Nexucis

comment created time in 10 days

issue commentcodemirror/codemirror.next

v0.9.0 not properly packaged

Could you be more specific? It seems to contain all the necessary files when I install it.

Nexucis

comment created time in 10 days

issue commentcodemirror/CodeMirror

Codemirror show-hint widget sometimes positioned incorrectly

Since this isn't happening in the demo, could you try to simplify your setup until you find out what is causing this?

eforeland

comment created time in 10 days

pull request commentcodemirror/CodeMirror

[css] add reserved words

could you clarify what it means by non-standard words in the context of css.js?

Not being in any current (non-draft) CSS standard.

orionlee

comment created time in 10 days

issue closedlezer-parser/lezer

export parser.term.js

Would you be agree to include in the index.es.js the exported const you can find in the file parser.term.js ?

If we assume for the example, I have the following file parser.term.js:

// This file was generated by lezer-generator. You probably shouldn't edit it.
export const
  MyNodeName = 1,

Then instead of doing this:

tree.name === "MyNodeName"

We could do this :

import { MyNodeName } from 'my-lezer-grammar'

[...]

tree.type.id === MyNodeName 

Like that it avoid any string duplication.

closed time in 11 days

Nexucis
more