Commit 76047b6
committed
bug #62409 [Yaml] Align unquoted multiline scalar parsing with spec for comments (yoeunes)
This PR was merged into the 6.4 branch.
Discussion
----------
[Yaml] Align unquoted multiline scalar parsing with spec for comments
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
This PR is a follow-up to [#62359](#62359 (comment)) based on feedback from `@xabbuh` regarding spec compliance.
My previous PR fixed a `ParseException` on blank lines, but it handled comments incorrectly (it **ignored** them inside the scalar).
This PR aligns the parser with the YAML spec ([3.2.3.3](https://yaml.org/spec/1.2.2/#3233-comments)):
1. It **keeps the fix** for blank lines (they are correctly preserved).
2. It **changes comment handling**: instead of ignoring an indented comment, the parser now **terminates** the multiline scalar when it encounters one.
Commits
-------
7911644 [Yaml] Align unquoted multiline scalar parsing with spec for comments2 files changed
+25
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
778 | | - | |
| 778 | + | |
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1752 | 1752 | | |
1753 | 1753 | | |
1754 | 1754 | | |
1755 | | - | |
| 1755 | + | |
1756 | 1756 | | |
1757 | | - | |
| 1757 | + | |
1758 | 1758 | | |
1759 | 1759 | | |
1760 | 1760 | | |
1761 | 1761 | | |
1762 | | - | |
| 1762 | + | |
1763 | 1763 | | |
1764 | | - | |
| 1764 | + | |
1765 | 1765 | | |
1766 | 1766 | | |
1767 | | - | |
1768 | | - | |
1769 | | - | |
1770 | | - | |
| 1767 | + | |
1771 | 1768 | | |
1772 | 1769 | | |
1773 | 1770 | | |
1774 | | - | |
| 1771 | + | |
1775 | 1772 | | |
1776 | 1773 | | |
1777 | 1774 | | |
| |||
1789 | 1786 | | |
1790 | 1787 | | |
1791 | 1788 | | |
1792 | | - | |
| 1789 | + | |
1793 | 1790 | | |
1794 | 1791 | | |
1795 | 1792 | | |
1796 | 1793 | | |
1797 | | - | |
1798 | | - | |
| 1794 | + | |
1799 | 1795 | | |
1800 | 1796 | | |
1801 | 1797 | | |
1802 | | - | |
| 1798 | + | |
1803 | 1799 | | |
1804 | 1800 | | |
1805 | 1801 | | |
| |||
1818 | 1814 | | |
1819 | 1815 | | |
1820 | 1816 | | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
1821 | 1832 | | |
1822 | 1833 | | |
1823 | 1834 | | |
| |||
0 commit comments