blipson89 / Leprechaun

A template code generation framework for Rainbow
MIT License
42 stars 22 forks source link

Multi-Line Text value in `__Long description` causes generation of .cs files with wrong syntax #50

Open Antonytm opened 2 years ago

Antonytm commented 2 years ago

Presence of Multi-Line

    Hint: __Long description
    Value: |
      Line 1
      Line 2
      Line 3

__Long description in serialization file

....
ID: "049c2604-7311-45a2-b05d-590dce623b89"
Parent: "049c2604-7311-45a2-b05d-590dce623b88"
Template: "049c2604-7311-45a2-b05d-590dce623b87"
Path: /sitecore/templates/Feature/MyFeature/MyTemplate
Languages:
- Language: en
  Fields:
  - ID: "049c2604-7311-45a2-b05d-590dce623b86"
    Hint: Title
    Value: Field that require long desciption
  - ID: "049c2604-7311-45a2-b05d-590dce623b85"
    Hint: __Long description
    Value: |
      Line 1
      Line 2
      Line 3
 ...     

causes the generation of the .cs file that could not be compiled due to syntax errors.

 /// <summary>Line 1
Line 2
Line 3</summary>
[SitecoreField(FieldName = ...)]
Antonytm commented 2 years ago

Fix provided in this PR: https://github.com/blipson89/Leprechaun/pull/51