You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a limitation with placeholders where their default values cannot contain the following characters: []{}. These characters are reserved for the placeholder delimiters.
But these characters are commonly used in Markdown - in particular, to create hyperlinks, like this:
This is a sentence [with an embedded hyperlink](https://github.com/aecreations/clippings)!
Placeholders with a default value containing Markdown-formatted hyperlinks won't cause the placeholder prompt to appear, and they will be inserted as is.
To work around this, the placeholder prompt dialog should detect if any placeholder values contain a URL, and format them accordingly when pasting.
For example, if a placeholder value that was entered into the placeholder prompt dialog is https://aecreations.io/clippings/index.php, the inserted text should be: [https://aecreations.io/clippings/index.php](https://aecreations.io/clippings/index.php). It would then render as:
If the placeholder value contains a URL after it, enclosed in parentheses - e.g.: an embedded link(https://aecreations.io/clippings/index.php), the inserted text should be: [an embedded link](https://aecreations.io/clippings/index.php), which would be rendered as:
What if there is text before and after the link? Perhaps the placeholder value could be formatted like so:
This is a sample clipping with an ::embedded link(https://aecreations.io/clippings/index.php) in the sentence.
...where the double colon indicates the start of the hyperlink display text. The above would then convert to: This is a sample clipping with an [embedded link](https://aecreations.io/clippings/index.php) in the sentence., and be rendered as:
This is a sample clipping with an embedded link in the sentence.
When placeholder values are detected with the above formatting patterns, upon clicking OK in the placeholder prompt, open a modal dialog within the placeholder prompt window asking the user if the URLs should be formatted as Markdown links:
A web address was detected in the placeholder value. Format as a Markdown link?
< Yes> < No >
A web address was detected in one or more placeholder values. Format as Markdown links?
< Yes> < No >
There should be a checkbox option (default turned on) in Clippings preferences (Paste tab) to enable this functionality:
[X] Ask if placeholder values containing web addresses should be formatted as Markdown links
The text was updated successfully, but these errors were encountered:
Beginning in Firefox 134, a new static method, RegExp.escape() can escape characters in regular expressions:
The RegExp.escape() static method escapes any potential regex syntax characters in a string, and returns a new string that can be safely used as a literal pattern for the RegExp() constructor.
There is a limitation with placeholders where their default values cannot contain the following characters:
[]{}
. These characters are reserved for the placeholder delimiters.But these characters are commonly used in Markdown - in particular, to create hyperlinks, like this:
...which is displayed as:
Placeholders with a default value containing Markdown-formatted hyperlinks won't cause the placeholder prompt to appear, and they will be inserted as is.
To work around this, the placeholder prompt dialog should detect if any placeholder values contain a URL, and format them accordingly when pasting.
For example, if a placeholder value that was entered into the placeholder prompt dialog is
https://aecreations.io/clippings/index.php
, the inserted text should be:[https://aecreations.io/clippings/index.php](https://aecreations.io/clippings/index.php)
. It would then render as:If the placeholder value contains a URL after it, enclosed in parentheses - e.g.:
an embedded link(https://aecreations.io/clippings/index.php)
, the inserted text should be:[an embedded link](https://aecreations.io/clippings/index.php)
, which would be rendered as:What if there is text before and after the link? Perhaps the placeholder value could be formatted like so:
...where the double colon indicates the start of the hyperlink display text. The above would then convert to:
This is a sample clipping with an [embedded link](https://aecreations.io/clippings/index.php) in the sentence.
, and be rendered as:When placeholder values are detected with the above formatting patterns, upon clicking OK in the placeholder prompt, open a modal dialog within the placeholder prompt window asking the user if the URLs should be formatted as Markdown links:
There should be a checkbox option (default turned on) in Clippings preferences (Paste tab) to enable this functionality:
The text was updated successfully, but these errors were encountered: