Releases: ipikuka/remark-flexible-markers
v1.2.1
The changes made by @talatkuyuk
- updated the dependencies
- added a badge for npm downloads in the README
- corrected some typos in the README
- made some refinements in types
- fixed: the option
markerProperties
shouldn't have "className" key in the returned object, if there is, the plugin deletes the entry from returned object so as not to effect the<mark>
attributes
v1.2.0
The changes made by @talatkuyuk
- missing keys are added for color classifications into the dictionary
- the
tsconfig.js
is updated - the dependencies are updated and added new dependencies
- the type of settings is improved and now, it is partially required on the type of options
- a second visitor is added to find marker syntax if the content to be marked contains other phrasing contents, fixes #2
- minor breaking change: the name of the option
doubleEqualityCheck
is changed with theequalityOperator
- a third visitor and the option
actionForEmptyContent
option is added for empty content markers - the
@types/mdast
is extended with theMark
type - the regex for matching mark syntax is updated, and it is more strict now
- a test util is added and the tests are updated
- the new types
TagNameFunction
andClassNameFunction
are added into the exported typeFlexibleMarkerOptions
in order the optionsmarkerTagName
andmarkerClassName
can take a callback functions respectively - test coverage is added %100 and connected with
codecov
- type coverage is added %100
- the badges are updated in README.md including coverages
package-lock.json
file is added for fixing a github action- npm provenance is applied and an action for pull requests is added into github actions
- the README.md is completely re-written
It is more powerful now
As of version ^1.2.0
, the remark-flexible-markers
can handle also the syntax containing other markdown phrases like strong, emphasis, link etc. See https://github.com/ipikuka/remark-flexible-markers?tab=readme-ov-file#it-is-more-powerfull
==**marked bold content**==
==_marked italic content_==
==[marked link](https://google.com)==
It is more strict now
The double equity signs must be adjacent to the content. Here is an example for bad usage, and cause to not work.
== text with unwanted space==
==text with unwanted space ==
It is more flexible now
The options markerTagName
and markerClassName
can take a callback function in addition to string
, now.
type TagNameFunction = (color?: string) => string;
type ClassNameFunction = (color?: string) => string[];
{
// ...
markerTagName?: string | TagNameFunction;
markerClassName?: string | ClassNameFunction;
// ...
);
For more information see https://github.com/ipikuka/remark-flexible-markers?tab=readme-ov-file#markertagname and https://github.com/ipikuka/remark-flexible-markers?tab=readme-ov-file#markerclassname
In addition to that, a new option actionForEmptyContent?: "keep" | "remove" | "mark"
is added to handle mark syntax with empty content. See https://github.com/ipikuka/remark-flexible-markers?tab=readme-ov-file#actionforemptycontent
Please pay attention to a minor breaking change that the name of the option doubleEqualityCheck
is changed with the equalityOperator
, the behavior is the same.
v1.0.4
Release notes and the changes made by @talatkuyuk
- refactored the
.npmrc
file - updated the dependencies and fixed the type issues
- refactored the
tsconfig.json
- updated the
README.md
- fixed the toMatchInlineSnapshot jest method in tests since jest does not support prettier@3 yet
- added
doubleEqualityCheck
option
It is a string option in order not to confuse with logical double equality (example: a == b)
.
If there is one double equality expression in a text node, there is no problem. But if there is two double equality expressions in a text node, the plugin assumes they are marker but actually not.
The default value of this option is undefined, which means no check.
In order the plugin to handle this kind of expressions correctly, for example If a == b and c == d then the theorem is right
, assuming you set the option doubleEqualityCheck: "=:="
, the expression should be If a =:= b and c =:= d then the theorem is right
. Then, the plugin is going to convert the =:=
into ==
as should be.
v1.0.3
- added
src
directory into files inpackage.json
for source map support - added the list of the remark packages I have published into README.md
v1.0.2
- updated moduleResolution in tsconfig by @talatkuyuk
v1.0.1
- updated README and classification dictionary by @talatkuyuk
v1.0.0
initial release !