0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-14 23:42:41 +00:00

Fix Syntax Highlighting

Update changelog to match PR target shifts.
This commit is contained in:
David Bolack
2024-02-07 20:23:19 -06:00
parent ea320e0cc4
commit f3148ed53c
2 changed files with 26 additions and 11 deletions

View File

@@ -80,7 +80,7 @@ pre {
## changelog ## changelog
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery). For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
### Tuesday 07/11/2023 ### Tuesday 02/07/2024
{{ taskList {{ taskList
@@ -88,22 +88,37 @@ For a full record of development, visit our [Github Page](https://github.com/nat
* [x] Add user requested feature for definition lists with multiple definitions. * [x] Add user requested feature for definition lists with multiple definitions.
This implements issue [#2340](https://github.com/naturalcrit/homebrewery/issues/2340) by extending the existing syntax pattern. Additional definitions must be on the same line. This implements issue [#2340](https://github.com/naturalcrit/homebrewery/issues/2340) by extending the existing syntax pattern.
Multiple Definition Description (\<dd\>) terms must go on the following line with a blank line between definition sets. Additionally, Descriptions may be multi-line, if desired. Multi-line descriptions will be concatenated into a single Description on render.
The previous, inline system has not been removed, however, the two forms may not be intermixed.
``` ```
Dictionary Term :: Definition One :: Definition Two :: Definition Three Dictionary Term
:: Definition One
:: Definition Two
:: Definition Three
``` ```
Example: Example:
``` ```
Egg::Came before the Chicken::Python Packaging Format::Over Easy isn't
Egg Egg
Came before the Chicken ::Came before the Chicken
Python Packaging Format ::Python Packaging Format
Over Easy isn't ::Over
Easy
isn't
``` ```
Results:
```
<dl>
<dt>Egg</dt>
<dd>Came before the Chicken</dd>
<dd>Python Packaging Format</dd>
<dd>Over Easy isn't</dd>
</dl>
```
}} }}
### Friday 13/10/2023 - v3.10.0 ### Friday 13/10/2023 - v3.10.0

View File

@@ -160,8 +160,8 @@ const Editor = createClass({
codeMirror.markText({ line: lineNumber, ch: match.indices[2][0] }, { line: lineNumber, ch: match.indices[2][1] }, { className: 'dd-highlight' }); codeMirror.markText({ line: lineNumber, ch: match.indices[2][0] }, { line: lineNumber, ch: match.indices[2][1] }, { className: 'dd-highlight' });
const ddIndex = match.indices[2][0]; const ddIndex = match.indices[2][0];
let colons = /::/g; let colons = /::/g;
let colonMatches; let colonMatches = colons.exec(match[2]);
while((colonMatches = colons.exec(match[2])) !== null){ if(colonMatches !== null){
codeMirror.markText({ line: lineNumber, ch: colonMatches.index + ddIndex }, { line: lineNumber, ch: colonMatches.index + colonMatches[0].length + ddIndex }, { className: 'dl-colon-highlight'} ) codeMirror.markText({ line: lineNumber, ch: colonMatches.index + ddIndex }, { line: lineNumber, ch: colonMatches.index + colonMatches[0].length + ddIndex }, { className: 'dl-colon-highlight'} )
} }
} }