MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / classifyAttribHTML

Function classifyAttribHTML

scintilla/lexers/LexHTML.cxx:244–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
245 bool wordIsNumber = IsNumber(start, styler);
246 char chAttr = SCE_H_ATTRIBUTEUNKNOWN;
247 if (wordIsNumber) {
248 chAttr = SCE_H_NUMBER;
249 } else {
250 char s[100];
251 GetTextSegment(styler, start, end, s, sizeof(s));
252 if (keywords.InList(s))
253 chAttr = SCE_H_ATTRIBUTE;
254 }
255 if ((chAttr == SCE_H_ATTRIBUTEUNKNOWN) && !keywords)
256 // No keywords -> all are known
257 chAttr = SCE_H_ATTRIBUTE;
258 styler.ColourTo(end, chAttr);
259}
260
261static int classifyTagHTML(unsigned int start, unsigned int end,
262 WordList &keywords, Accessor &styler, bool &tagDontFold,

Callers 1

ColouriseHyperTextDocFunction · 0.85

Calls 4

IsNumberFunction · 0.85
GetTextSegmentFunction · 0.85
InListMethod · 0.80
ColourToMethod · 0.80

Tested by

no test coverage detected