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.