<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4018/css-colon-eol, branch main</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=main</id>
<link rel='self' href='https://git.shady.money/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-06-03T21:45:56Z</updated>
<entry>
<title>userdiff: add built-in pattern for CSS</title>
<updated>2016-06-03T21:45:56Z</updated>
<author>
<name>William Duclot</name>
<email>william.duclot@ensimag.grenoble-inp.fr</email>
</author>
<published>2016-06-03T12:32:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0719f3eecd1234f6331cab980088239207e93335'/>
<id>urn:sha1:0719f3eecd1234f6331cab980088239207e93335</id>
<content type='text'>
CSS is widely used, motivating it being included as a built-in pattern.

It must be noted that the word_regex for CSS (i.e. the regex defining
what is a word in the language) does not consider '.' and '#' characters
(in CSS selectors) to be part of the word. This behavior is documented
by the test t/t4018/css-rule.
The logic behind this behavior is the following: identifiers in CSS
selectors are identifiers in a HTML/XML document. Therefore, the '.'/'#'
character are not part of the identifier, but an indicator of the nature
of the identifier in HTML/XML (class or id). Diffing ".class1" and
".class2" must show that the class name is changed, but we still are
selecting a class.

Logic behind the "pattern" regex is:
    1. reject lines ending with a colon/semicolon (properties)
    2. if a line begins with a name in column 1, pick the whole line

Credits to Johannes Sixt (j6t@kdbg.org) for the pattern regex and most
of the tests.

Signed-off-by: William Duclot &lt;william.duclot@ensimag.grenoble-inp.fr&gt;
Signed-off-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Reviewed-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
