pimd
pimd copied to clipboard
Allow RegEx and Strings for Showmore plugin
Currently the Showmore plugin accepts ranges (= from line X to line Y).
In future, it should also support RegEx and Strings like the Highlight plugin. For example:
```html +shomore=/value=".+"/
<input class="my-class" value="Lorem ipsum">
```
Should look like:
<input class="my-class" ···>
On click, the ···
button should reveal value="Lorem ipsum"
.
Further reading:
- https://github.com/hagenburger/pimd/tree/master/plugins/showmore#pimd-showmore-plugin: Current implementation of the Showmore plugin with video example of revealing the hidden content
- https://github.com/hagenburger/pimd/tree/master/plugins/highlight#pimd-highlight-plugin: how the strings and RegExp are implemented in the Highlight plugin (instead of highlighting the match, this issue should replace the match with a
···
button) - https://github.com/hagenburger/pimd/blob/master/plugins/showmore/index.js: This is the place where the code should be implemented
- https://github.com/hagenburger/pimd/blob/master/plugins/showmore/test.js: This is the place where the tests should be implemented