Skip to content

Commit 6735402

Browse files
jwoo-msftlicanhuajanusbalJanus Balatbatshabripabba
authored
Jwoo/release/21.09 (#7050)
* Added App extension to podspec (#6849) * app extension model added updated spec added podspec at root for testing\n revert it spec updated updated pod spec pod spec update moretesting [updated macro name] * updated podspec * [ios] Updated to final podspec version * update compiler flag * pod spec update * updated flag name * [iOS] fixed empty filtered list issue (#6528) * [iOS] fixed empty filtered list issue * [iOS] changed to function call Co-authored-by: Canhua Li <licanhua@live.com> * moving resource bundle to core (#6853) Co-authored-by: Janus Balatbat <jsbalatbat@microsoft.com> * Rounding off to 2 decimals (#6863) * [ios] updated round off logic (#6866) * [ios] updated round off logic * [ios] refactored the code * [ios] fixed project file * [ios] fixed log * [ios] spec updated * update test (#6864) * added heartbeat test ios build infrastructure (#6842) * [iOS] added yml version of ci updated path [ios] path update [iOS] variable updated [ios] added new test scheme * [iOS] added spec linting task added missing test file updated spect lint task added error handling added parallelism to jobs * added cert test added cert install yml updated pass Update ios-heartbeat.yml for Azure Pipelines added provisional file added script unimportant commit unimportant commit unimportant commit * added e-mail message simple update added e-mail message added e-mail message added e-mail message updated e-mail message updated e-mail message updated e-mail message * updated cron job * added false test Revert "added false test" This reverts commit ef302f0. * added false test added build task to cert task added build task to cert task added build task to cert task good cert bad prov added app push * parameterized template updated parameters updated params updated parameters updated to correct provisional file * updated trigger * updated e-mail address * Bug fixes: Textblock layout | Parsing warnings (#7041) * need to take accoutn for empty * works but need to find memory leak * testing against stackedit * removing unneeded line | allocating array * clean up * getting rid of str() use from strigstream * handling link destination with [ character and other tokens * removing cpp changes Co-authored-by: Janus Balatbat <jsbalatbat@microsoft.com> * Bug fixes: Handling of link markdown (#6922) * need to take accoutn for empty * works but need to find memory leak * testing against stackedit * removing unneeded line | allocating array * clean up * getting rid of str() use from strigstream * handling link destination with [ character and other tokens * removing the ios changes * resolving comments * resolving comments * clan format Co-authored-by: Janus Balatbat <jsbalatbat@microsoft.com> * updated android-ci yml to use latest macOs Co-authored-by: Canhua Li <licanhua@live.com> Co-authored-by: janusbal <86079148+janusbal@users.noreply.github.com> Co-authored-by: Janus Balatbat <jsbalatbat@microsoft.com> Co-authored-by: shabripabba <87400370+shabripabba@users.noreply.github.com>
1 parent 9607681 commit 6735402

File tree

5 files changed

+250
-190
lines changed

5 files changed

+250
-190
lines changed

.pipelines/android-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ trigger:
1717

1818
pool:
1919
name: Azure Pipelines
20-
vmImage: macOS-10.14
20+
vmImage: 'macos-latest'
2121

2222
steps:
2323
- task: Gradle@2

source/ios/AdaptiveCards/AdaptiveCards/AdaptiveCards/ACOAdaptiveCard.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ + (ACOAdaptiveCardParseResult *)fromJson:(NSString *)payload;
6262
try {
6363
ACOAdaptiveCard *card = [[ACOAdaptiveCard alloc] init];
6464
std::shared_ptr<ParseResult> parseResult = AdaptiveCard::DeserializeFromString(std::string([payload UTF8String]), std::string("1.5"));
65-
NSMutableArray *acrParseWarnings;
65+
NSMutableArray *acrParseWarnings = [[NSMutableArray alloc] init];
6666
std::vector<std::shared_ptr<AdaptiveCardParseWarning>> parseWarnings = parseResult->GetWarnings();
6767
for (const auto &warning : parseWarnings) {
6868
ACRParseWarning *acrParseWarning = [[ACRParseWarning alloc] initWithParseWarning:warning];

source/ios/AdaptiveCards/AdaptiveCards/AdaptiveCards/ACRColumnView.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ - (void)configureWidthOfView:(UIView *)view
5252
}
5353

5454
[view setContentHuggingPriority:priority forAxis:UILayoutConstraintAxisHorizontal];
55-
[view setContentCompressionResistancePriority:UILayoutPriorityDefaultHigh forAxis:UILayoutConstraintAxisHorizontal];
55+
[view setContentCompressionResistancePriority:UILayoutPriorityDefaultLow forAxis:UILayoutConstraintAxisHorizontal];
5656
[self setContentHuggingPriority:priority forAxis:UILayoutConstraintAxisHorizontal];
5757
[self setContentCompressionResistancePriority:UILayoutPriorityDefaultHigh forAxis:UILayoutConstraintAxisHorizontal];
5858
// if columnWidth is set to stretch or number, allow column to fill the available space

source/shared/cpp/ObjectModel/MarkDownBlockParser.cpp

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ void EmphasisParser::CaptureEmphasisToken(const int ch, std::string& currentToke
369369
void LinkParser::Match(std::stringstream& stream)
370370
{
371371
// link syntax check, match keyword at each stage
372-
if (MatchAtLinkInit(stream) && MatchAtLinkTextRun(stream) && MatchAtLinkTextEnd(stream) &&
373-
MatchAtLinkDestinationStart(stream) && MatchAtLinkDestinationRun(stream))
372+
bool capturedLink = (MatchAtLinkInit(stream) && MatchAtLinkTextRun(stream) && MatchAtLinkTextEnd(stream));
373+
if (capturedLink && MatchAtLinkDestinationStart(stream) && MatchAtLinkDestinationRun(stream))
374374
{
375375
/// Link is in correct syntax, capture it as link
376376
CaptureLinkToken();
@@ -436,6 +436,7 @@ bool LinkParser::MatchAtLinkTextEnd(std::stringstream& lookahead)
436436
{
437437
if (lookahead.peek() == '(')
438438
{
439+
++m_linkDestinationStart;
439440
char streamChar{};
440441
lookahead.get(streamChar);
441442
m_linkTextParsedResult.AddNewTokenToParsedResult(streamChar);
@@ -449,37 +450,48 @@ bool LinkParser::MatchAtLinkTextEnd(std::stringstream& lookahead)
449450
// link is in form of [txt](url), this method matches '('
450451
bool LinkParser::MatchAtLinkDestinationStart(std::stringstream& lookahead)
451452
{
452-
// if peeked char is EOF or extended char, this isn't a match
453+
// handles [xx](
453454
if (lookahead.peek() < 0)
454-
{
455-
return false;
456-
}
457-
458-
// control key is detected, syntax check failed
459-
if (MarkDownBlockParser::IsCntrl(lookahead.peek()))
460455
{
461456
m_parsedResult.AppendParseResult(m_linkTextParsedResult);
462457
return false;
463458
}
464459

465-
if (lookahead.peek() == ')')
460+
// identify where the destination value ends by marking the position
461+
// e.g: ([ab()c])()()() end = 7
462+
m_parsingCurrentPos = lookahead.tellg();
463+
int i = static_cast<int>(m_parsingCurrentPos);
464+
while (lookahead.peek() != EOF && m_linkDestinationStart > 0)
466465
{
467-
lookahead.get();
468-
return true;
469-
}
466+
char c;
467+
lookahead.get(c);
470468

471-
// parses destination
472-
ParseBlock(lookahead);
469+
if (c == '(')
470+
{
471+
++m_linkDestinationStart;
472+
}
473+
else if (c == ')')
474+
{
475+
--m_linkDestinationStart;
476+
}
477+
if (m_linkDestinationStart == 0)
478+
{
479+
m_linkDestinationEnd = i;
480+
}
481+
++i;
482+
}
483+
lookahead.clear();
484+
lookahead.seekg(m_parsingCurrentPos, std::ios::beg);
473485

474-
if (lookahead.peek() == ')')
486+
// control key is detected, syntax check failed
487+
if (MarkDownBlockParser::IsCntrl(lookahead.peek()))
475488
{
476-
return true;
489+
m_parsedResult.AppendParseResult(m_linkTextParsedResult);
490+
return false;
477491
}
478492

479-
m_parsedResult.AppendParseResult(m_linkTextParsedResult);
480-
return false;
493+
return true;
481494
}
482-
483495
// link is in form of [txt](url), this method matches ')'
484496
bool LinkParser::MatchAtLinkDestinationRun(std::stringstream& lookahead)
485497
{
@@ -490,14 +502,25 @@ bool LinkParser::MatchAtLinkDestinationRun(std::stringstream& lookahead)
490502
return false;
491503
}
492504

493-
if (lookahead.peek() == ')')
505+
m_parsingCurrentPos = lookahead.tellg();
506+
while (m_parsingCurrentPos <= m_linkDestinationEnd && lookahead.peek() != EOF)
494507
{
495-
lookahead.get();
496-
return true;
508+
if (lookahead.peek() == '[')
509+
{
510+
// we found an opening in the destination. Catch it.
511+
char c{};
512+
lookahead.get(c);
513+
m_parsedResult.AddNewTokenToParsedResult(c);
514+
}
515+
else
516+
{
517+
ParseBlock(lookahead);
518+
}
519+
m_parsingCurrentPos = int(lookahead.tellg());
497520
}
498521

499-
// parses destination
500-
ParseBlock(lookahead);
522+
m_parsedResult.PopBack();
523+
501524
return true;
502525
}
503526

0 commit comments

Comments
 (0)