ruddfawcett / Notepad

[iOS] A fully themeable markdown editor with live syntax highlighting.
http://rudd.fyi/notepad
MIT License
881 stars 106 forks source link

Feature/named capturing groups #64

Open siburb opened 4 years ago

siburb commented 4 years ago

Added two new properties to Style to allow us to iterate through the named capturing groups in the regex, and also to retrieve styles by name.

This allows us to apply any other style to a named sub-range of the matched range.

Added an example for h3 to the 'one-dark-custom' style.

28

siburb commented 4 years ago

Whilst this works, it doesn't allow the named groups to inherit the font/traits/size of the parent. Hold off on reviewing it for now and I'll do some work on that.

ruddfawcett commented 4 years ago

This looks great thus far — thanks, @siburb.