Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parse of inner layout #975

Merged
merged 4 commits into from
Oct 18, 2015
Merged

Fix parse of inner layout #975

merged 4 commits into from
Oct 18, 2015

Conversation

304NotModified
Copy link
Member

Parse of inner layout was not always correct working. Escaping of colon and bracket was only with hack (${literal:text=\:}) possible. This is now fixed. It does still need an escape with \. The work around is also still working.

fixes #444 and #914

Working examples:

  • ${when:when=1 == 1:Inner=Test\: Hello}
  • ${when:when=1 == 1:Inner=Test\\Hello}
  • ${when:when=1 == 1:Inner=Test\Hello}
  • ${when:when=1 == 1:Inner=Test{Hello\}}

We need to escape : and } in an inner layout because:

  • : because it's a value separator.
  • } because it's the end of the layout

note: no need to escape \.

Fixes #914 confirmed with unit tests ("ComplexWhenWithHashTest" fails with master)

@304NotModified 304NotModified added the bug Bug report / Bug fix label Oct 18, 2015
@304NotModified 304NotModified added this to the 4.2 milestone Oct 18, 2015
@codecov-io
Copy link

Current coverage is 70.48%

Merging #975 into master will not affect coverage as of fde4423

@@            master    #975   diff @@
======================================
  Files          262     262       
  Stmts        14770   14786    +16
  Branches      1610    1613     +3
  Methods          0       0       
======================================
+ Hit          10410   10422    +12
- Partial        398     399     +1
- Missed        3962    3965     +3

Review entire Coverage Diff as of fde4423


Uncovered Suggestions

  1. +0.09% via ...oredConsoleTarget.cs#232...244
  2. +0.08% via ...c/NLog/LogFactory.cs#180...191
  3. +0.07% via ...anceCounterTarget.cs#308...318
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

@304NotModified 304NotModified changed the title Fix colon parse Fix parse of inner layout Oct 18, 2015
304NotModified added a commit that referenced this pull request Oct 18, 2015
@304NotModified 304NotModified merged commit a2d8686 into master Oct 18, 2015
@304NotModified 304NotModified deleted the fix-colon-parse branch October 22, 2015 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report / Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants