Skip to content

Commit

Permalink
#117 Stop styling numbers at line start in PRECHAR style.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdipardo authored and nyamatongwe committed Nov 13, 2022
1 parent 3ed48ec commit 537dfaa
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/LexillaHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@ <h3>
F#: Add specifiers for 64-bit integer and floating point literals.
<a href="https://github.com/ScintillaOrg/lexilla/issues/112">Issue #112</a>.
</li>
<li>
Markdown: Stop styling numbers at line start in PRECHAR style.
<a href="https://github.com/ScintillaOrg/lexilla/issues/117">Issue #117</a>.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/lexilla520.zip">Release 5.2.0</a>
Expand Down
3 changes: 3 additions & 0 deletions lexers/LexMarkdown.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ static void ColorizeMarkdownDoc(Sci_PositionU startPos, Sci_Position length, int
sc.SetState(SCE_MARKDOWN_OLIST_ITEM);
sc.Forward(digitCount + 1);
sc.SetState(SCE_MARKDOWN_DEFAULT);
} else {
// a textual number at the margin should be plain text
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
}
// Alternate Ordered list
Expand Down
12 changes: 12 additions & 0 deletions test/examples/markdown/Issue117.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
The number:

338269006135764734700913562171

is prime. Therefore:

1. the only factors of 338269006135764734700913562171 are:

1
338269006135764734700913562171

2. 338269006135764734700913562171 is a natural number
13 changes: 13 additions & 0 deletions test/examples/markdown/Issue117.md.folded
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
0 400 0 The number:
0 400 0
0 400 0 338269006135764734700913562171
0 400 0
0 400 0 is prime. Therefore:
0 400 0
0 400 0 1. the only factors of 338269006135764734700913562171 are:
0 400 0
0 400 0 1
0 400 0 338269006135764734700913562171
0 400 0
0 400 0 2. 338269006135764734700913562171 is a natural number
0 400 0
12 changes: 12 additions & 0 deletions test/examples/markdown/Issue117.md.styled
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{0}The number:{1}

{0}338269006135764734700913562171{1}

{0}is prime. Therefore:{1}

{12} {14}1.{0} the only factors of 338269006135764734700913562171 are:{1}

{12} {0} 1{1}
{12} {0} 338269006135764734700913562171{1}

{12} {14}2.{0} 338269006135764734700913562171 is a natural number{1}

0 comments on commit 537dfaa

Please sign in to comment.