Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
4411b167
Commit
4411b167
authored
Aug 07, 2008
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
documented expand_keywords changes
parent
725b5273
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
+26
-4
doc/function/expand_keywords.txt
doc/function/expand_keywords.txt
+26
-4
No files found.
doc/function/expand_keywords.txt
View file @
4411b167
...
@@ -30,13 +30,35 @@ is used. This shows reminder text by default based on a [[type:set]] option, and
...
@@ -30,13 +30,35 @@ is used. This shows reminder text by default based on a [[type:set]] option, and
--Parameters--
--Parameters--
! Parameter Type Description
! Parameter Type Description
| @input@ [[type:tagged string]] String to expand keywords in.
| @input@ [[type:tagged string]] String to expand keywords in.
| @condition@ [[type:function]] DOC_MSE_VERSION: since 0.3.7
When should a keyword be recognized at all?
| @default_expand@ [[type:function]] Should reminder text be shown by default?
| @default_expand@ [[type:function]] Should reminder text be shown by default?
| @combine@ [[type:function]] How to combine keywords with the reminder text?
| @combine@ [[type:function]] How to combine keywords with the reminder text?
--Arguments--
The @condition@, @default_expand@ and @combine@ functions will be called for each potential keyword match in the input.
! Parameter Type Description
| @param1@, @param2@, ... [[type:tagged string]]* The parameter values.
| @mode@ [[type:string]] The @mode@ of the keyword.
| @used_placeholders@ [[type:boolean]] DOC_MSE_VERSION: since 0.3.7
Is a placeholder used for any of the parameters?
| @correct_case@ [[type:boolean]] DOC_MSE_VERSION: since 0.3.7
Is the keyword matched exactly, with the same case?
| @keyword@ [[type:tagged string]] In @combine@ only: The full keyword text including parameters
| @reminder@ [[type:string]] In @combine@ only: The expanded reminder text.
--Examples--
--Examples--
Assuming a keyword @"mse"@ exists with reminder text @"Magic Set Editor"@ exists.
Assuming a keyword @"mse"@ exists with reminder text @"Magic Set Editor"@ exists.
> expand_keywords(default_expand: {true}, combine: { keyword + "
= " + reminder
}, "mse is cool")
> expand_keywords(default_expand: {true}, combine: { keyword + "
(= " + reminder + ")"
}, "mse is cool")
> == "<kw-A>mse
= Magic Set Editor
is cool</kw-A>"
> == "<kw-A>mse
(= Magic Set Editor)
is cool</kw-A>"
>
>
> f := expand_keywords@(default_expand: {true}, combine: { keyword+"="+reminder })
> f := expand_keywords@(default_expand: {true}, combine: { keyword+" (= "+reminder+")" })
> f("mse is cool") == "<kw-A>mse = Magic Set Editor is cool</kw-A>"
> f("mse is cool") == "<kw-A>mse (= Magic Set Editor) is cool</kw-A>"
DOC_MSE_VERSION: since 0.3.7
Keyword matching is case insensitive, to get case sensitive matching use a @condition@ that check for the @correct case@:
> expand_keywords(..., condition: { correct_case })
In prior MSE versions matching was always case sensitive.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment