Skip to content

Commit

Permalink
fix: Remove trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Feb 5, 2024
1 parent 77221f5 commit c4a5328
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const SENTENCE_END_MARKERS = '.?!…';
const QUOTATION_GENERIC_MARKERS = `"„'`;
const QUOTATION_CLOSE_MARKERS = '»”’';
const QUOTATION_GENERIC_MARKERS = `«"„'`;
const QUOTATION_CLOSE_MARKERS = "”’';
const BRACKETS_CLOSE_MARKERS = '\\)\\]\\}>';

const WINDOW_WIDTH = 10;
Expand Down
4 changes: 4 additions & 0 deletions src/rules/abbreviations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,13 @@ const pairAbbreviation = allPass([

// tail abbreviation join
const insideAbbreviationMap = anyPass([
// @ts-ignore
prop(__, INITIALS),
// @ts-ignore
prop(__, HEAD),
// @ts-ignore
prop(__, TAIL),
// @ts-ignore
prop(__, OTHER),
]);

Expand Down
7 changes: 2 additions & 5 deletions src/sentenize.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable security/detect-non-literal-regexp, security/detect-unsafe-regex */
import {compose, map, trim, anyPass, zipWith, call} from 'ramda';
import {compose, anyPass, zipWith, call} from 'ramda';

import {sentences, fstChars, lstChars} from './parsers';
import {
Expand Down Expand Up @@ -69,9 +69,6 @@ function processor(text: string): string[] {
return parsed;
}

// sentences postprocessing
const postprocessor = map(trim);

const sentenize = compose(postprocessor, processor);
const sentenize = processor;

export {sentenize};

0 comments on commit c4a5328

Please sign in to comment.