Skip to content

[Feature Request] Attribute to force multiline literal string serialization #62

Description

@levicki

It would be nice if tomlet supported something like this:

namespace GoodGirl
{
	public class DoggyPatch
	{
		public string Name		{ get; set; }
		public string Tags		{ get; set; }
		[TomlMultilineLiteralString]
		public string Search		{ get; set; }
		[TomlMultilineLiteralString]
		public string Replace		{ get; set; }
	}
}

So basically an attribute [TomlMultilineLiteralString] (or [TomlMultiLineLiteralString]) which would force said string properties to be serialized as:

Search = '''
    if (!V.streaming.xvideos) V.streaming.xvideos = [];
'''
Replace = '''
    if (!V.streaming.xvideos) V.streaming.xvideos = [];
    if (!V.streaming.old_xvideos) V.streaming.old_xvideos = [];
'''

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions