Skip to content

Commit 12fd0ca

Browse files
committed
Merge branch '2.3' into 2.5
* 2.3: [Doc] Use Markdown syntax highlighting [Finder] tweaked docs [Finder] Add info about possibilities offered by SplFileInfo fix components tests [Intl] FIxed failing test [Intl] Generated the data for ICU version 54-rc [EventDispatcher] fix doc bloc on EventDispatcherInterface [Validator] Update validators.zh_CN.xlf, fix translation error bumped Symfony version to 2.3.21 updated VERSION for 2.3.20 update CONTRIBUTORS for 2.3.20 updated CHANGELOG for 2.3.20 [Intl] Integrated ICU data into Intl component Conflicts: src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Intl/ResourceBundle/LocaleBundle.php
2 parents caf5ecc + a8826cf commit 12fd0ca

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ CssSelector converts CSS selectors to XPath expressions.
66
The component only goal is to convert CSS selectors to their XPath
77
equivalents:
88

9-
use Symfony\Component\CssSelector\CssSelector;
9+
```php
10+
use Symfony\Component\CssSelector\CssSelector;
1011

11-
print CssSelector::toXPath('div.item > h4 > a');
12+
print CssSelector::toXPath('div.item > h4 > a');
13+
```
1214

1315
HTML and XML are different
1416
--------------------------
@@ -18,11 +20,13 @@ default. If you need to use this component with `XML` documents, you have to
1820
disable this `HTML` extension. That's because, `HTML` tag & attribute names
1921
are always lower-cased, but case-sensitive in `XML`:
2022

21-
// disable `HTML` extension:
22-
CssSelector::disableHtmlExtension();
23+
```php
24+
// disable `HTML` extension:
25+
CssSelector::disableHtmlExtension();
2326

24-
// re-enable `HTML` extension:
25-
CssSelector::enableHtmlExtension();
27+
// re-enable `HTML` extension:
28+
CssSelector::enableHtmlExtension();
29+
```
2630

2731
When the `HTML` extension is enabled, tag names are lower-cased, attribute
2832
names are lower-cased, the following extra pseudo-classes are supported:

0 commit comments

Comments
 (0)