Comments (6)
I'm not entirely dissatisfied with the way abbreviations work in MMD-5, however the algorithm to replace them will need to be modified. There are two general options:
-
Read the document to find all abbreviation definitions, then scan the document for all uses of the abbreviation, and replace it with the appropriate syntax. Advantage -- automatically identifies all uses of the abbreviation without user action. Disadvantage -- requires scanning the entire document for each occurrence of each defined abbreviation. In MMD-5, this meant that 10 abbreviations would require scanning almost every word of the document 10 times. I've now worked on some code that could check for all 10 abbreviations in a single pass, but would still be a bit messy.
-
Require the author to "tag" each use of the abbreviation that they desire to be handled. Each abbreviation would still only have to be defined once, but this would require more effort when writing or revising the document. Advantage -- much more efficient, since abbreviations would be identified during the usual parse process, just like links and footnotes. Disadvantage -- it becomes possible for an author to forget to take some uses of an abbreviation.
I welcome thoughts and input on this feature!
from multimarkdown-6.
I think the single pass scan beats option 2.
from multimarkdown-6.
As I think about this (and after re-implementing glossary support), I think that I will do a few things re: abbreviations:
-
The syntax will fall more in line with footnotes, citations, and now abbreviations -- something along the lines of the
[xfoo]
wherex
is some punctuation character. -
The approach used for glossary items that requires tagging each use makes a lot of sense from a performance standpoint. Comparing each word in the document to an abbreviation list is expensive. And, because of the way MMD-6 is optimized for performance, it is a bit tricky.
-
What might make sense for automated identification of abbreviations within the text would be a separate (optional) stage that takes the identified list of abbreviations and automatically wraps each instance in the
[xfoo]
syntax before re-processing the document. -
For those wanting "easy" -- give MMD a bit more time, and it will automatically identify each occurrence of abbreviations (and glossary terms?). If you need performance -- then each instance should be marked in advance, and MMD will use it's normal fast approach.
from multimarkdown-6.
I think the new abbreviation syntax is better than the old one. There may still be room for some improvement.
See https://github.com/fletcher/MultiMarkdown-6/wiki/Changes-from-MMD-5 for more information.
from multimarkdown-6.
The new syntax is nice but I'd like to vote for some sort of compatibility mode (command line switch, metadata key) which enables automatic identification of abbreviation and glossary terms. I'd happily accept the performance penalty.
from multimarkdown-6.
That was always on the list, and has been added this evening. Abbreviations and glossary terms are now automatically identified.
from multimarkdown-6.
Related Issues (20)
- Using image reference and filename with odd number of underscores makes MM not to convert HTML to Markdown HOT 1
- Empty line after indented code block not recognized as BLOCK_EMPTY, not its newline as TEXT_NL HOT 5
- How to correctly use transclusion? HOT 4
- The first line containing a : (colon) is always treated as metadata HOT 5
- Problems with transclusion for streamed input on Windows^TM^ HOT 1
- [Feature request] File transclusion on remote raw sources HOT 4
- [Question] After stripping of MARKER_BLOCKQUOTE in tokenization, could we add back MARKER_BLOCKQUOTE when the line/block is finished? HOT 1
- Automatic abbreviation processing is not reliable HOT 2
- Export from Ghostwriter via Multimarkdown 6.6.0 to odt format fails when image is included HOT 4
- Missing Image Condition for ODT and Epub Could Be Improved HOT 6
- Broken Link to single document PDF on the GH-Pages site HOT 1
- Tables in lists with leading blanks don't render in MMDComposer5 HOT 3
- Build warning and question on directory for option HOT 4
- Please consider adding option to hide Markdown source and search windows in MMDComposer HOT 3
- Bold around a link doesn't display properly (in MultiMarkdown Viewer v5.0.0 (2023.06.08.16.13) HOT 1
- Underscores in LaTeX autorefs Are Unnecessarily Escaped HOT 1
- Image won't display in MMDComposer5 Version 5.0.0 (2023.11.03.03.02) HOT 1
- Grammar railroad diagram HOT 1
- File transclusion happens even when inside a html comment. HOT 1
- Install failed on macOS Sonoma - How to uninstall completely HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multimarkdown-6.