Pascal Emmet

I'll try to publish some code I use in my program.
Alextp
Posts: 28
Joined: 23 Aug 2014 23:36

Re: Pascal Emmet

Post by Alextp » 31 May 2019 13:52

It helped, 3-4 issues fixed. Thanks.

a) FPC warnings:
var "ws" not used.
in ExpandTagAbbrev, var "s" not inited.

b) I added to Github the Delphi demo. Delphi 10.3. in it, I still see these issues:
https://github.com/Alexey-T/Emmet-Pascal/issues/4
https://github.com/Alexey-T/Emmet-Pascal/issues/5

User avatar
Rickard Johansson
Site Admin
Posts: 5821
Joined: 19 Jul 2006 14:29

Re: Pascal Emmet

Post by Rickard Johansson » 31 May 2019 16:40

Release v1.03. Hopefully that fixes all issues.

Alextp
Posts: 28
Joined: 23 Aug 2014 23:36

Re: Pascal Emmet

Post by Alextp » 31 May 2019 17:58

Found new issues- by testing all Emmet docs.
Same GH page, pls see.

User avatar
Rickard Johansson
Site Admin
Posts: 5821
Joined: 19 Jul 2006 14:29

Re: Pascal Emmet

Post by Rickard Johansson » 01 Jun 2019 07:57

Updated to version 1.04.

Alextp
Posts: 28
Joined: 23 Aug 2014 23:36

Re: Pascal Emmet

Post by Alextp » 01 Jun 2019 11:07

Can you write - what are possible Syntax values?
I know -- html, xsl, svg, css
Correct?
These allowed too?- scss, sass, less, jsx?

User avatar
Rickard Johansson
Site Admin
Posts: 5821
Joined: 19 Jul 2006 14:29

Re: Pascal Emmet

Post by Rickard Johansson » 01 Jun 2019 15:16

I added a ReadMe.md file to the zip and updated it to v1.05. Maybe you could add it to the GitHub repository and use it instead of the Readme.txt. Make the changes to it as you see fit, e.g. adding your real name or change home page...

Alextp
Posts: 28
Joined: 23 Aug 2014 23:36

Re: Pascal Emmet

Post by Alextp » 01 Jun 2019 21:37

a) Formatted .md file a little ('free Pascal'->'Free Pascal', removed bad spaces, aligned paragraph)

b) added compat with FPC release 3.0.4 (it had no Pos with 3 arguments, so I added call of PosEx). Pls take my changes to not loose them

Alextp
Posts: 28
Joined: 23 Aug 2014 23:36

Re: Pascal Emmet

Post by Alextp » 01 Jun 2019 22:46

c) You have 2 funcs with "var AList: TStringList". Pls remove "var" because AList pointer is not changed, only object props are changed.

d) Can you make 2 properties:
FilenameSnippets: string (def value 'Snippets.ini')
FilenameLorem: string (def value 'Lorem.txt')
pls?
I want lowercase names (Unix case sensitive) and other names.

User avatar
Rickard Johansson
Site Admin
Posts: 5821
Joined: 19 Jul 2006 14:29

Re: Pascal Emmet

Post by Rickard Johansson » 02 Jun 2019 21:33

Released v1.06.

Changes:
* Space should be treated as stop character.
* Implicit tag issue.
* User attribute space issue.

I also made some minor code changes and added two new properties.

Alextp
Posts: 28
Joined: 23 Aug 2014 23:36

Re: Pascal Emmet

Post by Alextp » 02 Jun 2019 22:45

Thanks for update.

About sSelText. Why is it needed at all? for library it's not needed. app can just find | char and replace it with any block. If it's mul-carets, app can replace all |.
sSelText is not work for a lib.

User avatar
Rickard Johansson
Site Admin
Posts: 5821
Joined: 19 Jul 2006 14:29

Re: Pascal Emmet

Post by Rickard Johansson » 03 Jun 2019 04:50

Wrap with Abbreviation is an important part of Emmet. And that is what sSelText is used for.

E.g. If you call ExpandAbbreviation() with

sAbbrev

Code: Select all

ul>li*
sSelText

Code: Select all

Line 1
Line 2
Line 3
Line 4
You get the result

Code: Select all

<ul>
  <li>Line 1</li>
  <li>Line 2</li>
  <li>Line 3</li>
  <li>Line 4</li>
</ul>

User avatar
Rickard Johansson
Site Admin
Posts: 5821
Joined: 19 Jul 2006 14:29

Re: Pascal Emmet

Post by Rickard Johansson » 04 Jun 2019 14:40

Released version 1.07 with support for placeholders $# used in "Wrap with Abbreviation".

Alextp
Posts: 28
Joined: 23 Aug 2014 23:36

Re: Pascal Emmet

Post by Alextp » 04 Jun 2019 23:24

I've reported a bug in GH issues pages, pls see.

Alextp
Posts: 28
Joined: 23 Aug 2014 23:36

Re: Pascal Emmet

Post by Alextp » 05 Jun 2019 11:56

+ constructor Create(const ADataPath: string; const ASnippetsFile: string = '';
+ const ALoremFile: string = ''); overload;

this renders properties FilenameMMMMM as useless. Pls remove them? Its enough to pass the params on Create.

and ADataPath is useless - why to have it if we have full names in ASnippetsFile, ALoremFile?

User avatar
Rickard Johansson
Site Admin
Posts: 5821
Joined: 19 Jul 2006 14:29

Re: Pascal Emmet

Post by Rickard Johansson » 05 Jun 2019 12:25

Released v1.08.

Version 1.08
* Direction issue with multiply.
* Changes to the constructior.

Alextp
Don't forget to update the readme.md file (constructor has changed). You can check the included one in the zip file.

Post Reply