A web-based collaborative LaTeX editor
Find a file
Domagoj Kriskovic b87dad77d9 Added applyInsert/applyDelete methods to comments (#16572)
* Add CommentList to StringFileData

* added more types

* use toRaw

* using Map rather than array for comments

* using Range class

* Comment with ranges:Range[]

* Revert "Comment with ranges:Range[]"

This reverts commit 0783b1837562600637db03cc70c620129061c797.

* Comment with ranges:Range[]

* remove isDeleted

* commentList.toRaw()

* using toRaw

* commentId to id

* Revert "using toRaw"

This reverts commit 0c04ca5836f3befd5ec027bad5bf722e8b27f36c.

* fix merge

* make comment map internal to CommentList

* remove unused type

* fix parameter name in StringFileData

* import types more consistently

* more consistent type def

* Added moveOnInsert/moveOnDelete methods to comments

* use range helper methods

* mergeRanges function

* rename isAfter to startsAfter

* added @ts-checks

* using comment.isEmpty

* rename overlaps to covers

* remove ops in applyDelete

* mege, substract, isInRange

* ranges fixes, added tests

* rename to includes

* using pos,length in applyInsert

* simplify

* extendComment option

* check comment edges

* added inclusive option

* more specific touches()

* refactor mergeRanges()

* comment.addRange()

* remove inclusive option

* refactor using more helper methods

* fix typo

* inserting a comment between ranges tests

* test description fixes

* support only range

* more edge case testing

* added more range tests

* renamed to containsExcludingEdges

* endsAt check edge

* using firstIndex, lastIndex

* contains, containsIndex

* raturn -1 for lastIndex for empty ranges

* rename ranges in tests

* indexStartsAfter

* sort comment ranges

* rename to indexIsAfter, fix Range type

* add range if expandComment is true

* split the range when expandComment is false

* added moveBy and extendBy

* added more tests

* added comments

* prettier

* small fixes/typos

* rename indexIsAfter

* merge when deleting with overlaps

* added overlap test

* same range touches test

* test with overlapping comments

* delete duplicate test

* throw on empty range

GitOrigin-RevId: 1252e3d01f2f5dc1d00ce681c579506038e4d121
2024-02-02 09:03:28 +00:00
.github Merge pull request #4855 from overleaf/jpa-public-github-templates 2021-08-23 11:31:06 +00:00
develop Merge pull request #16845 from overleaf/csh-docker-compose 2024-02-01 09:03:43 +00:00
doc Merge pull request #9134 from overleaf/ae-server-ce-readme 2022-08-12 08:05:57 +00:00
libraries Added applyInsert/applyDelete methods to comments (#16572) 2024-02-02 09:03:28 +00:00
patches Merge pull request #15518 from overleaf/jpa-webpack-thread-loader 2023-11-03 09:00:23 +00:00
server-ce Merge pull request #16845 from overleaf/csh-docker-compose 2024-02-01 09:03:43 +00:00
services Add tags to Sentry error reports (#16465) 2024-02-02 09:03:23 +00:00
.gitignore Merge pull request #4734 from overleaf/jpa-server-ce-build 2021-08-17 08:03:11 +00:00
CONTRIBUTING.md Link to global security policy 2023-03-10 09:04:40 +00:00
docker-compose.debug.yml Merge pull request #14857 from overleaf/jpa-server-pro-web-api 2023-09-19 08:03:57 +00:00
docker-compose.yml Merge pull request #16488 from overleaf/msm-ce-mongo-5 2024-01-29 09:03:42 +00:00
LICENSE Merge remote-tracking branch 'dev-env/jpa-monorepo' into main 2021-08-05 08:03:43 +00:00
package-lock.json Merge pull request #16644 from overleaf/em-promisify-update-manager 2024-01-30 16:49:23 +00:00
package.json Merge pull request #16752 from overleaf/jpa-format-fix 2024-01-29 09:04:05 +00:00
README.md Merge pull request #12608 from overleaf/ae-link-dockerfiles 2023-04-19 08:02:56 +00:00
tsconfig.backend.json Added applyInsert/applyDelete methods to comments (#16572) 2024-02-02 09:03:28 +00:00


Overleaf

An open-source online real-time collaborative LaTeX editor.

WikiServer ProContributingMailing ListAuthorsLicense

A screenshot of a project being edited in Overleaf Community Edition

Figure 1: A screenshot of a project being edited in Overleaf Community Edition.

Community Edition

Overleaf is an open-source online real-time collaborative LaTeX editor. We run a hosted version at www.overleaf.com, but you can also run your own local version, and contribute to the development of Overleaf.

Enterprise

If you want help installing and maintaining Overleaf in your lab or workplace, we offer an officially supported version called Overleaf Server Pro. It also includes more features for security (SSO with LDAP or SAML), administration and collaboration (e.g. tracked changes). Find out more!

Keeping up to date

Sign up to the mailing list to get updates on Overleaf releases and development.

Installation

We have detailed installation instructions in the Overleaf Toolkit.

Upgrading

If you are upgrading from a previous version of Overleaf, please see the Release Notes section on the Wiki for all of the versions between your current version and the version you are upgrading to.

Overleaf Docker Image

This repo contains two dockerfiles, Dockerfile-base, which builds the sharelatex/sharelatex-base image, and Dockerfile which builds the sharelatex/sharelatex (or "community") image.

The Base image generally contains the basic dependencies like wget and aspell, plus texlive. We split this out because it's a pretty heavy set of dependencies, and it's nice to not have to rebuild all of that every time.

The sharelatex/sharelatex image extends the base image and adds the actual Overleaf code and services.

Use make build-base and make build-community from server-ce/ to build these images.

We use the Phusion base-image (which is extended by our base image) to provide us with a VM-like container in which to run the Overleaf services. Baseimage uses the runit service manager to manage services, and we add our init-scripts from the server-ce/runit folder.

Contributing

Please see the CONTRIBUTING file for information on contributing to the development of Overleaf.

Authors

The Overleaf Team

License

The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the LICENSE file.

Copyright (c) Overleaf, 2014-2021.